]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
setpriv: apply landlock without configuration
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 31 Jan 2024 17:01:08 +0000 (18:01 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 31 Jan 2024 17:01:08 +0000 (18:01 +0100)
Fixes #2746

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
sys-utils/setpriv-landlock.c

index 153e748f6713bb09428a28f453e654e1ca47c746..00ad38c61cc1451df3593a1326c7264f245d942c 100644 (file)
@@ -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,
        };