[PATCH v14 07/12] selftests/landlock: Check IOCTL restrictions for named UNIX domain sockets

Günther Noack gnoack at google.com
Thu Apr 18 11:24:05 UTC 2024


On Fri, Apr 12, 2024 at 05:17:54PM +0200, Mickaël Salaün wrote:
> On Fri, Apr 05, 2024 at 09:40:35PM +0000, Günther Noack wrote:
> 
> Please add a small patch description.  You can list the name of the
> test.

Done - I explained what the test checks for (that the access right should have
no effect on named UNIX domain sockets).

> > diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c
> > index 215f0e8bcd69..10b29a288e9c 100644
> > --- a/tools/testing/selftests/landlock/fs_test.c
> > +++ b/tools/testing/selftests/landlock/fs_test.c

> > +	ASSERT_LE(0, (srv_fd = socket(AF_UNIX, SOCK_STREAM, 0)));
> 
> I'd prefer not to have this kind of assignment and check at the same
> time.

Done.


> > +	ASSERT_LE(0, (cli_fd = socket(AF_UNIX, SOCK_STREAM, 0)));
> 
> Same here.

Done.

—Günther



More information about the Linux-security-module-archive mailing list