mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
tmux can call pledge() in main with large set and then reduce it
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd proc exec tty ps".
This commit is contained in:
parent
14da999408
commit
5383b047d1
2 changed files with 9 additions and 0 deletions
4
server.c
4
server.c
|
|
@ -178,6 +178,10 @@ server_start(struct event_base *base, int lockfd, char *lockfile)
|
|||
}
|
||||
close(pair[0]);
|
||||
|
||||
if (pledge("stdio rpath wpath cpath fattr unix recvfd proc exec tty "
|
||||
"ps", NULL) != 0)
|
||||
fatal("pledge failed");
|
||||
|
||||
/*
|
||||
* Must daemonise before loading configuration as the PID changes so
|
||||
* $TMUX would be wrong for sessions created in the config file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue