1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-01 16:52:06 +00:00

ProcFS: Supervisor-only inodes should be owned by UID 0, GID 0

This commit is contained in:
Andreas Kling 2019-12-31 13:22:43 +01:00
parent 5b1f8ce220
commit d8ef13a426

View file

@ -1040,8 +1040,11 @@ InodeMetadata ProcFSInode::metadata() const
}
if (proc_file_type > FI_Invalid && proc_file_type < FI_MaxStaticFileIndex) {
if (fs().m_entries[proc_file_type].supervisor_only)
if (fs().m_entries[proc_file_type].supervisor_only) {
metadata.uid = 0;
metadata.gid = 0;
metadata.mode &= ~077;
}
}
#ifdef PROCFS_DEBUG