1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:47:35 +00:00

Userland: Check sudoers file perms and owner in pls

As per comment found in #6319 by @bcoles, `pls` should check the
permissions and owner of the sudoers file to ensure that it hasn't
been compromised.
This commit is contained in:
Jesse Buhagiar 2021-04-17 00:55:05 +10:00 committed by Ali Mohammad Pur
parent 82b48d867d
commit d44e2c9ad9
5 changed files with 99 additions and 86 deletions

View file

@ -50,6 +50,9 @@ chmod 660 mnt/etc/WindowServer.ini
chown $window_uid:$window_gid mnt/etc/WindowServer.ini
echo "/bin/sh" > mnt/etc/shells
chmod 0400 mnt/etc/plsusers
chown 0:0 mnt/etc/plsusers
chown 0:$wheel_gid mnt/bin/su
chown 0:$wheel_gid mnt/bin/passwd
chown 0:$wheel_gid mnt/bin/ping
@ -57,6 +60,7 @@ chown 0:$wheel_gid mnt/bin/traceroute
chown 0:$phys_gid mnt/bin/keymap
chown 0:$phys_gid mnt/bin/shutdown
chown 0:$phys_gid mnt/bin/reboot
chown 0:$wheel_gid mnt/bin/pls
chown 0:0 mnt/boot/Kernel
chown 0:0 mnt/res/kernel.map
chmod 0400 mnt/res/kernel.map