summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2015-10-25 09:31:46 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2015-10-25 09:31:46 +0000
commit7930cb54c0cd6105899ba51be767697e1210aec2 (patch)
tree1de4426ea02d12a6569a25468897cf8bbc19a8ec /server.c
parent3e0d31c4e9a40571de2fe1d1dd66cc2cac04d5c9 (diff)
ifdef __OpenBSD__ around pledge().
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/server.c b/server.c
index 139505d4..d3be5cc1 100644
--- a/server.c
+++ b/server.c
@@ -177,9 +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