aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-09-19 02:17:45 -0400
committerMike Frysinger <vapier@gentoo.org>2015-09-19 02:17:45 -0400
commit9575f819a56b7bc4cb501fb63185b43084b66bd5 (patch)
tree0e196e97dde04c1cb1452fa2bc4d5346ddb2a7d6
parentsecurity: whitelist the futex syscall (diff)
downloadpax-utils-1.1.3.tar.gz
pax-utils-1.1.3.tar.bz2
pax-utils-1.1.3.zip
security: fix build on systems w/out si_syscallv1.1.3
Make sure we do not try to use si_syscall when it isn't available. URL: https://bugs.gentoo.org/560098
-rw-r--r--security.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/security.c b/security.c
index af06dcb..8776a80 100644
--- a/security.c
+++ b/security.c
@@ -44,11 +44,14 @@ static int pax_seccomp_rules_add(scmp_filter_ctx ctx, int syscalls[], size_t num
static void
pax_seccomp_sigal(__unused__ int signo, siginfo_t *info, __unused__ void *context)
{
+#ifdef si_syscall
warn("seccomp violated: syscall %i", info->si_syscall);
fflush(stderr);
-#ifdef si_syscall
warn(" syscall = %s",
seccomp_syscall_resolve_num_arch(seccomp_arch_native(), info->si_syscall));
+ fflush(stderr);
+#else
+ warn("seccomp violated: syscall unknown (no si_syscall)");
#endif
kill(getpid(), SIGSYS);
_exit(1);