diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2016-07-12 05:18:38 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2016-07-12 05:18:38 +0000 |
commit | 64b286c7df62ada31dfaeaaf812bce0a0a217325 (patch) | |
tree | 3ca968b1830a5a9a2feb52d20eb31486642ce175 /test-sandbox_init.c | |
parent | 7c248f50d315de6e082833a448c2ce9d69b6773b (diff) | |
download | mandoc-64b286c7df62ada31dfaeaaf812bce0a0a217325.tar.gz |
Add support for Mac OS X's sandbox_init(3) sandbox functionality, which
is marked as DEPRECATED in OS X after 2011 or so, but has not been
removed and has no replacement.
ok schwarze@
Diffstat (limited to 'test-sandbox_init.c')
-rw-r--r-- | test-sandbox_init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test-sandbox_init.c b/test-sandbox_init.c new file mode 100644 index 00000000..a4902ee6 --- /dev/null +++ b/test-sandbox_init.c @@ -0,0 +1,13 @@ +#include <sandbox.h> + +int +main(void) +{ + char *ep; + int rc; + + rc = sandbox_init(kSBXProfileNoInternet, SANDBOX_NAMED, &ep); + if (-1 == rc) + sandbox_free_error(ep); + return(-1 == rc); +} |