[BACK]Return to test-sandbox_init.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / test-sandbox_init.c (download)

Revision 1.1, Tue Jul 12 05:18:38 2016 UTC (5 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_14_5, VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2, VERSION_1_14_1, VERSION_1_13_4, VERSION_1_13, HEAD

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@

#include <sandbox.h>

	char	*ep;
	int	 rc;

	rc = sandbox_init(kSBXProfileNoInternet, SANDBOX_NAMED, &ep);
	if (-1 == rc)
	return(-1 == rc);