aboutsummaryrefslogtreecommitdiff
path: root/tmux.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-10-25 09:21:37 +0000
committerThomas Adam <thomas@xteddy.org>2015-10-25 09:21:37 +0000
commit4acc8d0ff5d99fadd1ef91a3898f561dec5adfb7 (patch)
treefcccdefa5179eaa064f129ab44a229e284a934b4 /tmux.c
parent8c3981366574f5c6496985e0127ca817f3d70037 (diff)
parent2e2b8a95bd13dab848a61113c9974c9ac936f9d6 (diff)
downloadrtmux-4acc8d0ff5d99fadd1ef91a3898f561dec5adfb7.tar.gz
rtmux-4acc8d0ff5d99fadd1ef91a3898f561dec5adfb7.tar.bz2
rtmux-4acc8d0ff5d99fadd1ef91a3898f561dec5adfb7.zip
Merge branch 'obsd-master'
Conflicts: cmd-find.c
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tmux.c b/tmux.c
index dff7952c..6e1de6f6 100644
--- a/tmux.c
+++ b/tmux.c
@@ -19,6 +19,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <err.h>
#include <errno.h>
#include <event.h>
#include <fcntl.h>
@@ -260,6 +261,10 @@ main(int argc, char **argv)
if (shell_cmd != NULL && argc != 0)
usage();
+ if (pledge("stdio rpath wpath cpath flock fattr unix sendfd recvfd "
+ "proc exec tty ps", NULL) != 0)
+ err(1, "pledge");
+
if (!(flags & CLIENT_UTF8)) {
/*
* If the user has set whichever of LC_ALL, LC_CTYPE or LANG