diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-10-25 09:31:07 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-10-25 09:31:07 +0000 |
commit | 91f53d590bba4282754a36632e04ddc97170f7ae (patch) | |
tree | f26f6035d904f316708f66ca68eb81082c16c862 | |
parent | 3e0d31c4e9a40571de2fe1d1dd66cc2cac04d5c9 (diff) | |
download | rtmux-91f53d590bba4282754a36632e04ddc97170f7ae.tar.gz rtmux-91f53d590bba4282754a36632e04ddc97170f7ae.tar.bz2 rtmux-91f53d590bba4282754a36632e04ddc97170f7ae.zip |
__OpenBSD__ around pledge()
-rw-r--r-- | server.c | 3 | ||||
-rw-r--r-- | tmux.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -177,10 +177,11 @@ server_start(struct event_base *base, int lockfd, char *lockfile) } close(pair[0]); +#ifdef __OpenBSD__ if (pledge("stdio rpath wpath cpath fattr unix recvfd proc exec tty " "ps", NULL) != 0) fatal("pledge failed"); - +#endif /* * Must daemonise before loading configuration as the PID changes so * $TMUX would be wrong for sessions created in the config file. @@ -259,9 +259,11 @@ main(int argc, char **argv) if (shell_cmd != NULL && argc != 0) usage(); +#ifdef __OpenBSD__ if (pledge("stdio rpath wpath cpath flock fattr unix sendfd recvfd " "proc exec tty ps", NULL) != 0) err(1, "pledge"); +#endif if (!(flags & CLIENT_UTF8)) { /* |