mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
Shell: Use pledge()
This commit is contained in:
parent
8c2009c5be
commit
1934a1ec0b
1 changed files with 5 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue