mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
Shell: Use pledge()
This commit is contained in:
parent
8c2009c5be
commit
1934a1ec0b
Notes:
sideshowbarker
2024-07-19 10:10:47 +09:00
Author: https://github.com/awesomekling
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