From dff8b8f72e8ae76f3f08f105e4eff454ae295f52 Mon Sep 17 00:00:00 2001 From: Michael Santos Date: Mon, 23 Jul 2018 10:23:37 -0400 Subject: [PATCH] sandbox/seccomp: return value from prctl(2) --- src/xmppipe_sandbox_seccomp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/xmppipe_sandbox_seccomp.c b/src/xmppipe_sandbox_seccomp.c index f91a517..703f52d 100644 --- a/src/xmppipe_sandbox_seccomp.c +++ b/src/xmppipe_sandbox_seccomp.c @@ -274,10 +274,7 @@ xmppipe_sandbox_init(xmppipe_state_t *state) if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) return -1; - if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) - return -1; - - return 0; + return prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog); } int @@ -386,9 +383,6 @@ xmppipe_sandbox_stdin(xmppipe_state_t *state) .filter = filter, }; - if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) - return -1; - - return 0; + return prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog); } #endif