diff --git a/kernel/include/kernel/FS/ProcFS/Inode.h b/kernel/include/kernel/FS/ProcFS/Inode.h index 79f4a309af..93b7411615 100644 --- a/kernel/include/kernel/FS/ProcFS/Inode.h +++ b/kernel/include/kernel/FS/ProcFS/Inode.h @@ -13,6 +13,9 @@ namespace Kernel static BAN::ErrorOr> create_new(Process&, TmpFileSystem&, mode_t, uid_t, gid_t); ~ProcPidInode() = default; + virtual uid_t uid() const override { return m_process.credentials().ruid(); } + virtual gid_t gid() const override { return m_process.credentials().rgid(); } + void cleanup(); protected: @@ -31,6 +34,9 @@ namespace Kernel static BAN::ErrorOr> create_new(Process&, size_t (Process::*callback)(off_t, BAN::ByteSpan) const, TmpFileSystem&, mode_t, uid_t, gid_t); ~ProcROInode() = default; + virtual uid_t uid() const override { return m_process.credentials().ruid(); } + virtual gid_t gid() const override { return m_process.credentials().rgid(); } + protected: virtual BAN::ErrorOr read_impl(off_t, BAN::ByteSpan) override; diff --git a/kernel/include/kernel/FS/TmpFS/Inode.h b/kernel/include/kernel/FS/TmpFS/Inode.h index e567aa27ee..b9a202efe0 100644 --- a/kernel/include/kernel/FS/TmpFS/Inode.h +++ b/kernel/include/kernel/FS/TmpFS/Inode.h @@ -27,8 +27,8 @@ namespace Kernel virtual ino_t ino() const override final { return m_ino; } virtual Mode mode() const override final { return Mode(m_inode_info.mode); } virtual nlink_t nlink() const override final { return m_inode_info.nlink; } - virtual uid_t uid() const override final { return m_inode_info.uid; } - virtual gid_t gid() const override final { return m_inode_info.gid; } + virtual uid_t uid() const override { return m_inode_info.uid; } + virtual gid_t gid() const override { return m_inode_info.gid; } virtual off_t size() const override final { return m_inode_info.size; } virtual timespec atime() const override final { return m_inode_info.atime; } virtual timespec mtime() const override final { return m_inode_info.mtime; }