xref https://github.com/coreos/rpm-ostree/issues/4830

(cherry picked from commit 1d94d2966ad14311b3ad3c010f1116e81dc7ed42)
This commit is contained in:
Colin Walters 2024-02-15 11:39:09 -05:00 committed by Karel Zak
parent 5854ee9f05
commit 1567a60b3a
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,32 @@
From 211a9da0b4e9704eea210d7944b723fa78272c79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
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 <thomas@t-8ch.de>
---
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

View File

@ -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