Ver código fonte

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

Andreas Kling 5 anos atrás
pai
commit
d8ef13a426
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      Kernel/FileSystem/ProcFS.cpp

+ 4 - 1
Kernel/FileSystem/ProcFS.cpp

@@ -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