lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20231001.Aiv7Chaedei0@digikod.net> Date: Mon, 2 Oct 2023 22:26:57 +0200 From: Mickaël Salaün <mic@...ikod.net> To: Konstantin Meskhidze <konstantin.meskhidze@...wei.com> Cc: willemdebruijn.kernel@...il.com, gnoack3000@...il.com, linux-security-module@...r.kernel.org, netdev@...r.kernel.org, netfilter-devel@...r.kernel.org, yusongping@...wei.com, artem.kuzin@...wei.com Subject: Re: [PATCH v12 09/12] selftests/landlock: Share enforce_ruleset() On Wed, Sep 20, 2023 at 05:26:37PM +0800, Konstantin Meskhidze wrote: > This commit moves enforce_ruleset() helper function to common.h so that > it can be used both by filesystem tests and network ones. > > Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@...wei.com> > --- > > Changes since v11: > * None. > > diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c > index 251594306d40..7c94d3933b68 100644 > --- a/tools/testing/selftests/landlock/fs_test.c > +++ b/tools/testing/selftests/landlock/fs_test.c > @@ -677,17 +677,7 @@ static int create_ruleset(struct __test_metadata *const _metadata, > return ruleset_fd; > } > > -static void enforce_ruleset(struct __test_metadata *const _metadata, > - const int ruleset_fd) > -{ > - ASSERT_EQ(0, prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)); > - ASSERT_EQ(0, landlock_restrict_self(ruleset_fd, 0)) > - { > - TH_LOG("Failed to enforce ruleset: %s", strerror(errno)); > - } > -} > - > -TEST_F_FORK(layout0, proc_nsfs) > +TEST_F_FORK(layout1, proc_nsfs) Why this change? > { > const struct rule rules[] = { > { > -- > 2.25.1 >
Powered by blists - more mailing lists