diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-28 22:11:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-29 01:09:19 +0200 |
commit | ae197deb6b076fb7b49bb035cfb3e4f8304004cb (patch) | |
tree | b8c17f95b575be4453626c983c59e0a1c59a3658 /Kernel/FileSystem/SysFS.cpp | |
parent | 59335bd8eaf7c4f11bb5a9ab96373dfe8eca0893 (diff) | |
download | serenity-ae197deb6b076fb7b49bb035cfb3e4f8304004cb.zip |
Kernel: Strongly typed user & group ID's
Prior to this change, both uid_t and gid_t were typedef'ed to `u32`.
This made it easy to use them interchangeably. Let's not allow that.
This patch adds UserID and GroupID using the AK::DistinctNumeric
mechanism we've already been employing for pid_t/ProcessID.
Diffstat (limited to 'Kernel/FileSystem/SysFS.cpp')
-rw-r--r-- | Kernel/FileSystem/SysFS.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp index 54503162e5..ed925c93b8 100644 --- a/Kernel/FileSystem/SysFS.cpp +++ b/Kernel/FileSystem/SysFS.cpp @@ -133,7 +133,7 @@ KResultOr<size_t> SysFSInode::write_bytes(off_t offset, size_t count, UserOrKern return m_associated_component->write_bytes(offset, count, buffer, fd); } -KResultOr<NonnullRefPtr<Inode>> SysFSInode::create_child(StringView, mode_t, dev_t, uid_t, gid_t) +KResultOr<NonnullRefPtr<Inode>> SysFSInode::create_child(StringView, mode_t, dev_t, UserID, GroupID) { return EROFS; } @@ -153,7 +153,7 @@ KResult SysFSInode::chmod(mode_t) return EPERM; } -KResult SysFSInode::chown(uid_t, gid_t) +KResult SysFSInode::chown(UserID, GroupID) { return EPERM; } |