mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
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:
parent
59335bd8ea
commit
ae197deb6b
44 changed files with 172 additions and 169 deletions
|
@ -92,11 +92,11 @@ public:
|
|||
virtual KResult getsockopt(FileDescription&, int level, int option, Userspace<void*>, Userspace<socklen_t*>);
|
||||
|
||||
pid_t origin_pid() const { return m_origin.pid; }
|
||||
uid_t origin_uid() const { return m_origin.uid; }
|
||||
gid_t origin_gid() const { return m_origin.gid; }
|
||||
UserID origin_uid() const { return m_origin.uid; }
|
||||
GroupID origin_gid() const { return m_origin.gid; }
|
||||
pid_t acceptor_pid() const { return m_acceptor.pid; }
|
||||
uid_t acceptor_uid() const { return m_acceptor.uid; }
|
||||
gid_t acceptor_gid() const { return m_acceptor.gid; }
|
||||
UserID acceptor_uid() const { return m_acceptor.uid; }
|
||||
GroupID acceptor_gid() const { return m_acceptor.gid; }
|
||||
const RefPtr<NetworkAdapter> bound_interface() const { return m_bound_interface; }
|
||||
|
||||
Mutex& lock() { return m_lock; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue