summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthatlittlegit <personal@thatlittlegit.tk>2020-02-23 12:55:32 -0500
committerAndreas Kling <kling@serenityos.org>2020-02-23 22:03:03 +0100
commitab9e5755baeeea701661492d31744c2cd4fcf367 (patch)
tree1a1064d3d7b373905f0afa0a15a9a6c8c14fb8a1
parent30556a0a9349110f3ecfdb60379f6838289a6295 (diff)
downloadserenity-ab9e5755baeeea701661492d31744c2cd4fcf367.zip
Userland+Kernel: Set shutdown/reboot to only be run by the `phys` group
-rwxr-xr-xKernel/build-root-filesystem.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/build-root-filesystem.sh b/Kernel/build-root-filesystem.sh
index 0f7701dec0..2d551cbd75 100755
--- a/Kernel/build-root-filesystem.sh
+++ b/Kernel/build-root-filesystem.sh
@@ -111,8 +111,12 @@ else
find ../Userland/ -type f -executable -exec cp {} mnt/bin/ \;
fi
chown 0:$wheel_gid mnt/bin/su
+chown 0:$phys_gid mnt/bin/shutdown
+chown 0:$phys_gid mnt/bin/reboot
chmod 4750 mnt/bin/su
chmod 4755 mnt/bin/ping
+chmod 4750 mnt/bin/reboot
+chmod 4750 mnt/bin/shutdown
echo "done"
printf "installing applications... "