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.
This commit is contained in:
Andreas Kling 2021-08-28 22:11:16 +02:00
commit ae197deb6b
Notes: sideshowbarker 2024-07-18 05:07:12 +09:00
44 changed files with 172 additions and 169 deletions

View file

@ -437,7 +437,7 @@ KResult FileDescription::chmod(mode_t mode)
return m_file->chmod(*this, mode);
}
KResult FileDescription::chown(uid_t uid, gid_t gid)
KResult FileDescription::chown(UserID uid, GroupID gid)
{
MutexLocker locker(m_lock);
return m_file->chown(*this, uid, gid);