diff --git a/0001-setpriv-apply-landlock-without-configuration.patch b/0001-setpriv-apply-landlock-without-configuration.patch new file mode 100644 index 0000000..287e5da --- /dev/null +++ b/0001-setpriv-apply-landlock-without-configuration.patch @@ -0,0 +1,32 @@ +From 211a9da0b4e9704eea210d7944b723fa78272c79 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Wed, 31 Jan 2024 18:01:08 +0100 +Subject: [PATCH] setpriv: apply landlock without configuration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes #2746 + +Signed-off-by: Thomas Weißschuh +--- + sys-utils/setpriv-landlock.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sys-utils/setpriv-landlock.c b/sys-utils/setpriv-landlock.c +index 153e748f6..00ad38c61 100644 +--- a/sys-utils/setpriv-landlock.c ++++ b/sys-utils/setpriv-landlock.c +@@ -166,6 +166,9 @@ void do_landlock(const struct setpriv_landlock_opts *opts) + struct list_head *entry; + int fd, ret; + ++ if (!opts->access_fs) ++ return; ++ + const struct landlock_ruleset_attr ruleset_attr = { + .handled_access_fs = opts->access_fs, + }; +-- +2.41.0 + diff --git a/util-linux.spec b/util-linux.spec index 85ab6d6..839ef65 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -98,6 +98,8 @@ Patch0: login-lastlog-create.patch # https://github.com/coreos/console-login-helper-messages/issues/60 Patch1: login-default-motd-file.patch +Patch2: 0001-setpriv-apply-landlock-without-configuration.patch + %description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among