]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
base-filesystem: pick more conservative access mode for /root/
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Jul 2022 21:47:31 +0000 (23:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 14 Jul 2022 16:18:34 +0000 (18:18 +0200)
Let's not allow anyone to look into /root/ if we create it via the
base-filesystem logic. i.e. change 0755 → 0750 as default access mode
for /root/, in case we create it if it happens to be missing.

src/shared/base-filesystem.c

index 6dacc1d20ae1af591ada29b1302918611396ca48..cd8ea493199330945b3620983391596cb13db9c5 100644 (file)
@@ -31,7 +31,7 @@ typedef struct BaseFilesystem {
 static const BaseFilesystem table[] = {
         { "bin",      0, "usr/bin\0",                  NULL },
         { "lib",      0, "usr/lib\0",                  NULL },
-        { "root",  0755, NULL,                         NULL, true },
+        { "root",  0750, NULL,                         NULL, true },
         { "sbin",     0, "usr/sbin\0",                 NULL },
         { "usr",   0755, NULL,                         NULL },
         { "var",   0755, NULL,                         NULL },