summaryrefslogtreecommitdiff
path: root/Kernel/ProcFS.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-10 06:10:01 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-10 06:10:01 +0100
commitcc04ba9cc9c7b4985c58c3e41ad396e999d75d58 (patch)
treeb82b03f6b6a71069738d24eba126ddbd1e741c76 /Kernel/ProcFS.cpp
parent5bd363c4bbea7609e0a13c20a6be74883ba79bf2 (diff)
downloadserenity-cc04ba9cc9c7b4985c58c3e41ad396e999d75d58.zip
ProcFS: /proc/sys entries should always be regular 644 files.
Diffstat (limited to 'Kernel/ProcFS.cpp')
-rw-r--r--Kernel/ProcFS.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/ProcFS.cpp b/Kernel/ProcFS.cpp
index e8a51f978b..7520ce14d5 100644
--- a/Kernel/ProcFS.cpp
+++ b/Kernel/ProcFS.cpp
@@ -754,6 +754,11 @@ InodeMetadata ProcFSInode::metadata() const
return metadata;
}
+ if (proc_parent_directory == PDI_Root_sys) {
+ metadata.mode = 00100644;
+ return metadata;
+ }
+
switch (proc_file_type) {
case FI_Root_self:
case FI_PID_cwd: