diff options
author | June McEnroe <june@causal.agency> | 2021-09-24 19:36:47 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-09-26 12:16:45 -0400 |
commit | 384271528b6315bb2532c1f06e59a84896766901 (patch) | |
tree | c6d3fc61853308556ec82d07df0c2b511aacc91e | |
parent | Link with -lncursesw (diff) | |
download | torus-384271528b6315bb2532c1f06e59a84896766901.tar.gz torus-384271528b6315bb2532c1f06e59a84896766901.zip |
OpenBSD: pledge(2) server
-rw-r--r-- | server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server.c b/server.c index 300322f..ee19ec8 100644 --- a/server.c +++ b/server.c @@ -392,6 +392,11 @@ int main(int argc, char *argv[]) { dprintf(pidFile, "%ju", (uintmax_t)getpid()); } +#ifdef __OpenBSD__ + error = pledge("stdio unix", NULL); + if (error) err(EX_OSERR, "pledge"); +#endif + #ifdef __FreeBSD__ error = cap_enter(); if (error) err(EX_OSERR, "cap_enter"); |