import libseccomp-2.5.2-1.el8
This commit is contained in:
parent
87ce45ebca
commit
3345105ef7
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/libseccomp-2.5.1.tar.gz
|
SOURCES/libseccomp-2.5.2.tar.gz
|
||||||
|
@ -1 +1 @@
|
|||||||
6069b720219400d8369f567af30cd2ad06ad938e SOURCES/libseccomp-2.5.1.tar.gz
|
81e6fc7b63baae9ba2b607d920588eb4d5072d6b SOURCES/libseccomp-2.5.2.tar.gz
|
||||||
|
92
SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch
Normal file
92
SOURCES/0101-fix-11-basic-basic_errors-on-old-kernels.patch
Normal 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;
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Summary: Enhanced seccomp library
|
Summary: Enhanced seccomp library
|
||||||
Name: libseccomp
|
Name: libseccomp
|
||||||
Version: 2.5.1
|
Version: 2.5.2
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mipsel mips64el ppc64 ppc64le s390 s390x
|
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 mipsel mips64el ppc64 ppc64le s390 s390x
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
@ -10,6 +10,9 @@ Group: System Environment/Libraries
|
|||||||
Source: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
Source: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
URL: https://github.com/seccomp/libseccomp
|
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
|
Buildrequires: gperf
|
||||||
%ifarch %{valgrind_arches}
|
%ifarch %{valgrind_arches}
|
||||||
# Versions prior to 3.13.0-4 do not work on ARM with newer glibc 2.25.0-6
|
# 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
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
%patch0101 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
make V=1 %{?_smp_mflags}
|
make V=1 %{?_smp_mflags}
|
||||||
@ -99,6 +104,10 @@ make V=1 check
|
|||||||
%{_libdir}/libseccomp.a
|
%{_libdir}/libseccomp.a
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Feb 18 2021 Radovan Sroka <rsroka@redhat.com> - 2.5.1-1
|
||||||
- rebase to 2.5.1
|
- rebase to 2.5.1
|
||||||
resolves: rhbz#1927635
|
resolves: rhbz#1927635
|
||||||
|
Loading…
Reference in New Issue
Block a user