slightly in the server to "stdio rpath wpath cpath fattr unix recvfd
proc exec tty ps".
-/* $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>
}
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.
-/* $OpenBSD: tmux.c,v 1.144 2015/09/14 12:12:24 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.145 2015/10/23 16:07:29 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
#include <sys/types.h>
#include <sys/stat.h>
+#include <err.h>
#include <errno.h>
#include <event.h>
#include <fcntl.h>
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