From 91f53d590bba4282754a36632e04ddc97170f7ae Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sun, 25 Oct 2015 09:31:07 +0000 Subject: __OpenBSD__ around pledge() --- server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server.c') diff --git a/server.c b/server.c index 139505d4..7dcad380 100644 --- a/server.c +++ b/server.c @@ -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. -- cgit