import libseccomp-2.5.2-1.el8

This commit is contained in:
CentOS Sources 2022-05-10 03:16:01 -04:00 committed by Stepan Oksanichenko
parent 87ce45ebca
commit 3345105ef7
4 changed files with 104 additions and 3 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libseccomp-2.5.1.tar.gz
SOURCES/libseccomp-2.5.2.tar.gz

View File

@ -1 +1 @@
6069b720219400d8369f567af30cd2ad06ad938e SOURCES/libseccomp-2.5.1.tar.gz
81e6fc7b63baae9ba2b607d920588eb4d5072d6b SOURCES/libseccomp-2.5.2.tar.gz

View File

@ -0,0 +1,92 @@
diff --color -ru a/tests/11-basic-basic_errors.c b/tests/11-basic-basic_errors.c
--- a/tests/11-basic-basic_errors.c 2021-09-01 18:57:34.018676687 +0200
+++ b/tests/11-basic-basic_errors.c 2021-11-05 15:04:34.647739284 +0100
@@ -29,9 +29,13 @@
int rc;
scmp_filter_ctx ctx;
uint32_t attr;
+ unsigned int api;
struct seccomp_notif *req = NULL;
struct seccomp_notif_resp *resp = NULL;
+ /* get the api level */
+ api = seccomp_api_get();
+
/* seccomp_init errors */
ctx = seccomp_init(SCMP_ACT_ALLOW + 1);
if (ctx != NULL)
@@ -199,39 +203,41 @@
ctx = NULL;
/* seccomp notify errors */
- ctx = seccomp_init(SCMP_ACT_ALLOW);
- if (ctx == NULL)
- return -1;
- rc = seccomp_notify_alloc(NULL, NULL);
- if (rc != 0)
- return -1;
- rc = seccomp_notify_alloc(&req, NULL);
- if (rc != 0)
- return -1;
- rc = seccomp_notify_alloc(NULL, &resp);
- if (rc != 0)
- return -1;
- seccomp_notify_free(NULL, NULL);
- seccomp_notify_free(req, resp);
- req = NULL;
- resp = NULL;
- rc = seccomp_notify_receive(-1, NULL);
- if (rc == 0)
- return -1;
- rc = seccomp_notify_respond(-1, NULL);
- if (rc == 0)
- return -1;
- rc = seccomp_notify_id_valid(-1, 0);
- if (rc == 0)
- return -1;
- rc = seccomp_notify_fd(NULL);
- if (rc == 0)
- return -1;
- rc = seccomp_notify_fd(ctx);
- if (rc == 0)
- return -1;
- seccomp_release(ctx);
- ctx = NULL;
+ if (api >= 5) {
+ ctx = seccomp_init(SCMP_ACT_ALLOW);
+ if (ctx == NULL)
+ return -1;
+ rc = seccomp_notify_alloc(NULL, NULL);
+ if (rc != 0)
+ return -1;
+ rc = seccomp_notify_alloc(&req, NULL);
+ if (rc != 0)
+ return -1;
+ rc = seccomp_notify_alloc(NULL, &resp);
+ if (rc != 0)
+ return -1;
+ seccomp_notify_free(NULL, NULL);
+ seccomp_notify_free(req, resp);
+ req = NULL;
+ resp = NULL;
+ rc = seccomp_notify_receive(-1, NULL);
+ if (rc == 0)
+ return -1;
+ rc = seccomp_notify_respond(-1, NULL);
+ if (rc == 0)
+ return -1;
+ rc = seccomp_notify_id_valid(-1, 0);
+ if (rc == 0)
+ return -1;
+ rc = seccomp_notify_fd(NULL);
+ if (rc == 0)
+ return -1;
+ rc = seccomp_notify_fd(ctx);
+ if (rc == 0)
+ return -1;
+ seccomp_release(ctx);
+ ctx = NULL;
+ }
return 0;
}

View File

@ -2,7 +2,7 @@
Summary: Enhanced seccomp library
Name: libseccomp
Version: 2.5.1
Version: 2.5.2
Release: 1%{?dist}
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mipsel mips64el ppc64 ppc64le s390 s390x
License: LGPLv2
@ -10,6 +10,9 @@ Group: System Environment/Libraries
Source: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
URL: https://github.com/seccomp/libseccomp
## From: https://github.com/seccomp/libseccomp/commit/5532444587fa5f33a43179ca5cc710f1bb05f51f
Patch0101: 0101-fix-11-basic-basic_errors-on-old-kernels.patch
Buildrequires: gperf
%ifarch %{valgrind_arches}
# Versions prior to 3.13.0-4 do not work on ARM with newer glibc 2.25.0-6
@ -57,6 +60,8 @@ Kernel.
%prep
%setup -q
%patch0101 -p1
%build
%configure
make V=1 %{?_smp_mflags}
@ -99,6 +104,10 @@ make V=1 check
%{_libdir}/libseccomp.a
%changelog
* Fri Nov 05 2021 Zoltan Fridrich <zfridric@redhat.com> - 2.5.2-1
- rebase to 2.5.2
resolves: rhbz#2019893
* Thu Feb 18 2021 Radovan Sroka <rsroka@redhat.com> - 2.5.1-1
- rebase to 2.5.1
resolves: rhbz#1927635