From 15fef261af3029c13d55c6a46a19c61187698278 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 10 2022 07:16:01 +0000 Subject: import libseccomp-2.5.2-1.el8 --- diff --git a/.gitignore b/.gitignore index 3bd6d21..6f0345b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libseccomp-2.5.1.tar.gz +SOURCES/libseccomp-2.5.2.tar.gz diff --git a/.libseccomp.metadata b/.libseccomp.metadata index 0887ec0..57568b8 100644 --- a/.libseccomp.metadata +++ b/.libseccomp.metadata @@ -1 +1 @@ -6069b720219400d8369f567af30cd2ad06ad938e SOURCES/libseccomp-2.5.1.tar.gz +81e6fc7b63baae9ba2b607d920588eb4d5072d6b SOURCES/libseccomp-2.5.2.tar.gz diff --git a/SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch b/SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch new file mode 100644 index 0000000..521cb67 --- /dev/null +++ b/SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch @@ -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; + } diff --git a/SPECS/libseccomp.spec b/SPECS/libseccomp.spec index 4b15ce7..536fbcb 100644 --- a/SPECS/libseccomp.spec +++ b/SPECS/libseccomp.spec @@ -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 - 2.5.2-1 +- rebase to 2.5.2 + resolves: rhbz#2019893 + * Thu Feb 18 2021 Radovan Sroka - 2.5.1-1 - rebase to 2.5.1 resolves: rhbz#1927635