diff --git a/sandbox.c b/sandbox.c index 120d4a3..f04bc08 100644 --- a/sandbox.c +++ b/sandbox.c @@ -17,13 +17,13 @@ #include "config.h" #if !HAVE_PLEDGE -#if !HAVE_SECCOMP_FILTER -#if !HAVE_CAPSICUM -#if !HAVE_SANDBOX_INIT -#warning Compiling without a sandbox!? -#endif -#endif -#endif +# if !HAVE_SECCOMP_FILTER +# if !HAVE_CAPSICUM +# if !HAVE_SANDBOX_INIT +# warning Compiling without a sandbox!? +# endif +# endif +# endif #endif #include @@ -52,28 +52,20 @@ int ksandbox_init_child(enum sandtype type, int fd1, int fd2, int fdfiled, int fdaccept) { - #if HAVE_CAPSICUM - if ( ! ksandbox_capsicum_init_child(type, - fd1, fd2, fdfiled, fdaccept)) { - XWARNX("ksandbox_capsicum_init_child"); - return(0); - } + if (!ksandbox_capsicum_init_child + (type, fd1, fd2, fdfiled, fdaccept)) + return 0; #elif HAVE_SANDBOX_INIT - if ( ! ksandbox_darwin_init_child(type)) { - XWARNX("ksandbox_darwin_init_child"); - return(0); - } + if (!ksandbox_darwin_init_child(type)) + return 0; #elif HAVE_PLEDGE - if ( ! ksandbox_pledge_init_child(type)) { - XWARNX("ksandbox_pledge_init_child"); - return(0); - } + if (!ksandbox_pledge_init_child(type)) + return 0; #elif HAVE_SECCOMP_FILTER - if ( ! ksandbox_seccomp_init_child(type)) { - XWARNX("ksandbox_seccomp_init_child"); - return(0); - } + if (!ksandbox_seccomp_init_child(type)) + return 0; #endif - return(1); + + return 1; }