1
0
forked from jengelh/libseccomp

Accepting request 761178 from home:Guillaume_G:branches:security

- Backport patch to fix test on aarch64:
  * libseccomp-fix_aarch64-test.patch

OBS-URL: https://build.opensuse.org/request/show/761178
OBS-URL: https://build.opensuse.org/package/show/security/libseccomp?expand=0&rev=70
This commit is contained in:
Marcus Meissner 2020-01-06 16:08:39 +00:00 committed by Git OBS Bridge
parent 70d729c69c
commit 59bec70d0c
3 changed files with 44 additions and 2 deletions

View File

@ -0,0 +1,36 @@
From 35803ceb43c453762a3ab5177c5f8d5dbb813478 Mon Sep 17 00:00:00 2001
From: Paul Moore <paul@paul-moore.com>
Date: Tue, 5 Nov 2019 15:11:11 -0500
Subject: [PATCH] tests: rely on __SNR_xxx instead of __NR_xxx for syscalls
We recently changed how libseccomp handles syscall numbers that are
not defined natively, but we missed test #15.
Signed-off-by: Paul Moore <paul@paul-moore.com>
---
tests/15-basic-resolver.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/15-basic-resolver.c b/tests/15-basic-resolver.c
index 6badef1..0c1eefe 100644
--- a/tests/15-basic-resolver.c
+++ b/tests/15-basic-resolver.c
@@ -55,15 +55,15 @@ int main(int argc, char *argv[])
unsigned int arch;
char *name = NULL;
- if (seccomp_syscall_resolve_name("open") != __NR_open)
+ if (seccomp_syscall_resolve_name("open") != __SNR_open)
goto fail;
- if (seccomp_syscall_resolve_name("read") != __NR_read)
+ if (seccomp_syscall_resolve_name("read") != __SNR_read)
goto fail;
if (seccomp_syscall_resolve_name("INVALID") != __NR_SCMP_ERROR)
goto fail;
rc = seccomp_syscall_resolve_name_rewrite(SCMP_ARCH_NATIVE, "openat");
- if (rc != __NR_openat)
+ if (rc != __SNR_openat)
goto fail;
while ((arch = arch_list[iter++]) != -1) {

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 6 14:23:04 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Backport patch to fix test on aarch64:
* libseccomp-fix_aarch64-test.patch
-------------------------------------------------------------------
Thu Dec 19 23:06:51 UTC 2019 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package libseccomp
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -24,13 +24,13 @@ Summary: A Seccomp (mode 2) helper library
License: LGPL-2.1-only
Group: Development/Libraries/C and C++
URL: https://github.com/seccomp/libseccomp
Source: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz
# no fitting key found
#Source2: https://github.com/seccomp/libseccomp/releases/download/v%version/libseccomp-%version.tar.gz.asc
Source3: %name.keyring
Source99: baselibs.conf
Patch1: no-static.diff
Patch2: libseccomp-fix_aarch64-test.patch
BuildRequires: autoconf
BuildRequires: automake >= 1.11
BuildRequires: fdupes