From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4889C1384AE for ; Sat, 19 Sep 2015 06:27:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 38B7CE08A0; Sat, 19 Sep 2015 06:27:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C6C34E089E for ; Sat, 19 Sep 2015 06:27:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B55A7340B57 for ; Sat, 19 Sep 2015 06:27:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 599EE1FD for ; Sat, 19 Sep 2015 06:27:08 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1442643465.9575f819a56b7bc4cb501fb63185b43084b66bd5.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: security.c X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 9575f819a56b7bc4cb501fb63185b43084b66bd5 X-VCS-Branch: master Date: Sat, 19 Sep 2015 06:27:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ea92eb5c-b80f-4f07-ae88-bdb1d703c2da X-Archives-Hash: 1987ac91285f6a7c9354c5c7583ac17d commit: 9575f819a56b7bc4cb501fb63185b43084b66bd5 Author: Mike Frysinger gentoo org> AuthorDate: Sat Sep 19 06:17:45 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sat Sep 19 06:17:45 2015 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=9575f819 security: fix build on systems w/out si_syscall Make sure we do not try to use si_syscall when it isn't available. URL: https://bugs.gentoo.org/560098 security.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);