From c00f8ff35db92d0bbbfcb1a510f8feffefe22c22 Mon Sep 17 00:00:00 2001 From: psykose <alice@ayaya.dev> Date: Thu, 21 Jul 2022 14:27:17 +0000 Subject: [PATCH] main/libseccomp: upgrade to 2.5.4 --- main/libseccomp/APKBUILD | 8 +- ...1-basic-errors-support-older-kernels.patch | 108 ------------------ 2 files changed, 3 insertions(+), 113 deletions(-) delete mode 100644 main/libseccomp/tests-11-basic-errors-support-older-kernels.patch diff --git a/main/libseccomp/APKBUILD b/main/libseccomp/APKBUILD index 65a917308471..ec8606c37f56 100644 --- a/main/libseccomp/APKBUILD +++ b/main/libseccomp/APKBUILD @@ -2,8 +2,8 @@ # Contributor: Carlo Landmeter <clandmeter@alpinelinux.org> # Contributor: Dan Williams <dan@ma.ssive.co> pkgname=libseccomp -pkgver=2.5.2 -pkgrel=1 +pkgver=2.5.4 +pkgrel=0 pkgdesc="interface to the Linux Kernel's syscall filtering mechanism" url="https://github.com/seccomp/libseccomp" arch="all" @@ -14,7 +14,6 @@ checkdepends="bash" subpackages="$pkgname-static $pkgname-dev $pkgname-doc py3-$pkgname:py3" source="https://github.com/seccomp/libseccomp/releases/download/v$pkgver/libseccomp-$pkgver.tar.gz remove-redefinition-prctl.patch - tests-11-basic-errors-support-older-kernels.patch " case "$CARCH" in @@ -64,7 +63,6 @@ py3() { } sha512sums=" -b2a95152cb274d6b35753596fd825406dae20c4a48b2f4076f835f977ecf324de38a3fe02e789dc20b49ecf6b4eb67f03e7733e92d40f5e20f25874307f1c2ac libseccomp-2.5.2.tar.gz +92650bd7d1d48b383f402a536b97a017fd0f6ad1234daf4b938d01c92e8d134a01d2f2dd45fd9e2d025d7556bd1386ec360402145a87f20580c85949d62cea0e libseccomp-2.5.4.tar.gz f2c31dcafdc9a1ad78e32e76b75e1c1603071eaa3f979e1f2483b879a34ad07e0a4ef3642196a695415cdf81e1ed2bf325175872fb4e203ef9d0e668c287493f remove-redefinition-prctl.patch -1b80fe8db16aead6f00ac30687b496b01cab16b60b2177f5992df7ed86bef6578de3ead74f2860b1ba951f62d6ba83aefd377d8ec2bc2f771e71ddafbe4a4b56 tests-11-basic-errors-support-older-kernels.patch " diff --git a/main/libseccomp/tests-11-basic-errors-support-older-kernels.patch b/main/libseccomp/tests-11-basic-errors-support-older-kernels.patch deleted file mode 100644 index 2e80c8e85275..000000000000 --- a/main/libseccomp/tests-11-basic-errors-support-older-kernels.patch +++ /dev/null @@ -1,108 +0,0 @@ -Url: https://github.com/seccomp/libseccomp/issues/338 -From 5532444587fa5f33a43179ca5cc710f1bb05f51f Mon Sep 17 00:00:00 2001 -From: Paul Moore <paul@paul-moore.com> -Date: Mon, 18 Oct 2021 09:42:02 -0600 -Subject: [PATCH] tests: fix 11-basic-basic_errors on old kernels (API level < - 5) - -Reported-by: Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> -Reported-by: Po-Hsu Lin <po-hsu.lin@canonical.com> -Signed-off-by: Paul Moore <paul@paul-moore.com> -Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> ---- - tests/11-basic-basic_errors.c | 72 +++++++++++++++++++---------------- - 1 file changed, 39 insertions(+), 33 deletions(-) - -diff --git a/tests/11-basic-basic_errors.c b/tests/11-basic-basic_errors.c -index 785e094e..dcfa7c28 100644 ---- a/tests/11-basic-basic_errors.c -+++ b/tests/11-basic-basic_errors.c -@@ -29,9 +29,13 @@ int main(int argc, char *argv[]) - 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) -@@ -234,39 +238,41 @@ int main(int argc, char *argv[]) - 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; - } -- GitLab