1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

passwd: Use LibCore syscall wrapper for setegid()

This commit is contained in:
Andreas Kling 2021-12-16 19:32:23 +01:00
parent 99eaeedf4e
commit 411c696057

View file

@ -21,10 +21,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return 1;
}
if (setegid(0) < 0) {
perror("setegid");
return 1;
}
TRY(Core::System::setegid(0));
TRY(Core::System::pledge("stdio wpath rpath cpath fattr tty"));
TRY(Core::System::unveil("/etc", "rwc"));