0 /* See LICENSE file for copyright and license details. */
1
2 #ifdef __OpenBSD__
3 #undef _POSIX_C_SOURCE
4 #include <stdio.h>
5 #include <unistd.h>
6 #include "util.h"
7 #include "conf.h"
8
9 int sandbox() {
10
11 if (unveil(conf.clients, "rwc") || unveil(NULL, NULL))
12 return -1;
13
14 if (pledge("stdio rpath wpath cpath inet dns", ""))
15 return -1;
16
17 return 0;
18 }
19 #else
20 typedef int hide_warning;
21 #endif
22