diff options
| author | Roy Marples <roy@marples.name> | 2020-09-20 00:43:36 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-09-20 00:43:36 +0100 |
| commit | 3f78506072b066311b18d0447904fb3ab2c1d31f (patch) | |
| tree | 52525de93295814cbf2c76c98db0cf46c391ea10 /src/privsep.c | |
| parent | cfcce96194b204bceb50fd7c7197387faed7fdaf (diff) | |
| download | dhcpcd-3f78506072b066311b18d0447904fb3ab2c1d31f.tar.xz | |
privsep: Don't be noisy about the sandbox
Diffstat (limited to 'src/privsep.c')
| -rw-r--r-- | src/privsep.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/privsep.c b/src/privsep.c index ca92c781..ffaa303a 100644 --- a/src/privsep.c +++ b/src/privsep.c @@ -493,27 +493,27 @@ int ps_entersandbox(const char *_pledge, const char **sandbox) { -#ifdef HAVE_CAPSICUM +#if !defined(HAVE_PLEDGE) + UNUSED(_pledge); +#endif + +#if defined(HAVE_CAPSICUM) if (sandbox != NULL) *sandbox = "capsicum"; return cap_enter(); -#endif -#ifdef HAVE_PLEDGE +#elif defined(HAVE_PLEDGE) if (sandbox != NULL) *sandbox = "pledge"; return pledge(_pledge, NULL); -#else - UNUSED(_pledge); -#endif -#ifdef HAVE_SECCOMP +#elif defined(HAVE_SECCOMP) if (sandbox != NULL) *sandbox = "seccomp"; return ps_seccomp_enter(); -#endif - +#else if (sandbox != NULL) - *sandbox = NULL; + *sandbox = "posix resource limited"; return 0; +#endif } int @@ -545,8 +545,8 @@ ps_mastersandbox(struct dhcpcd_ctx *ctx) } logerr("%s: %s", __func__, sandbox); return -1; - } else if (sandbox != NULL) - loginfox("sandbox: %s", sandbox); + } else + logdebugx("sandbox: %s", sandbox); return 0; } |
