Skip to content

Commit

Permalink
ProcFS: Supervisor-only inodes should be owned by UID 0, GID 0
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Dec 31, 2019
1 parent 5b1f8ce commit d8ef13a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Kernel/FileSystem/ProcFS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8ef13a

Please sign in to comment.