1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Shell: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 20:49:39 +01:00
parent 8c2009c5be
commit 1934a1ec0b

View file

@ -843,6 +843,11 @@ void save_history()
int main(int argc, char** argv)
{
if (pledge("stdio rpath wpath cpath proc exec tty", nullptr) < 0) {
perror("pledge");
return 1;
}
g.uid = getuid();
g.sid = setsid();
tcsetpgrp(0, getpgrp());