int
ksandbox_capsicum_init_child(void *arg, 
	enum sandtype type, int fd1, int fd2,
	int fdfiled, int fdaccept)
{
	int	 rc;

	switch (type) {
	case (SAND_WORKER):
		rc = ksandbox_capsicum_init_worker(arg, fd1, fd2);
		break;
	case (SAND_CONTROL_OLD):
		assert(-1 == fd2);
		rc = ksandbox_capsicum_init_control
			(arg, fd1, fdfiled, fdaccept);
		break;
	case (SAND_CONTROL_NEW):
		assert(-1 == fd2);
		rc = ksandbox_capsicum_init_control
			(arg, fd1, fdfiled, fdaccept);
		break;
	default:
		abort();
	}

	if ( ! rc) 
		XWARNX("capsicum sandbox failure");
	return(rc);
}
Exemple #2
0
int
ksandbox_capsicum_init_child(void *arg, 
	enum sandtype type, int fd1, int fd2)
{

	return(SAND_WORKER == type ?
		ksandbox_capsicum_init_worker(arg, fd1, fd2) :
		ksandbox_capsicum_init_control(arg, fd1, fd2));
}