mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 20:57:35 +00:00
ProcFS: Supervisor-only inodes should be owned by UID 0, GID 0
This commit is contained in:
parent
5b1f8ce220
commit
d8ef13a426
1 changed files with 4 additions and 1 deletions
|
@ -1040,9 +1040,12 @@ InodeMetadata ProcFSInode::metadata() const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proc_file_type > FI_Invalid && proc_file_type < FI_MaxStaticFileIndex) {
|
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;
|
metadata.mode &= ~077;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef PROCFS_DEBUG
|
#ifdef PROCFS_DEBUG
|
||||||
dbgprintf("Returning mode %o\n", metadata.mode);
|
dbgprintf("Returning mode %o\n", metadata.mode);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue