summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authornicm <nicm>2015-10-23 16:07:29 +0000
committernicm <nicm>2015-10-23 16:07:29 +0000
commit5383b047d1dd0d71f724d8f9cac4e45994506d35 (patch)
tree823f3a2854f5159c0cece2e7bee8ca970c6951cf /server.c
parent14da99940806dd63c2180ad238886fcb6735db04 (diff)
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".
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.c b/server.c
index ff38a353..7ce1c99d 100644
--- a/server.c
+++ b/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.