diff options
author | 2015-10-23 16:07:29 +0000 | |
---|---|---|
committer | 2015-10-23 16:07:29 +0000 | |
commit | 4e7a7ade8c378113fb9de224a8f3c8aa1de4fdcd (patch) | |
tree | 6a6d2aa511473883db7b02d85ac9237d58568068 /usr.bin/tmux/server.c | |
parent | Format for scroll position, from Jorge Morante. (diff) | |
download | wireguard-openbsd-4e7a7ade8c378113fb9de224a8f3c8aa1de4fdcd.tar.xz wireguard-openbsd-4e7a7ade8c378113fb9de224a8f3c8aa1de4fdcd.zip |
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 'usr.bin/tmux/server.c')
-rw-r--r-- | usr.bin/tmux/server.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index b8c892c95ae..741b7ed0b72 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.142 2015/10/22 10:48:30 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.143 2015/10/23 16:07:29 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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. |