From 2f3c16ff202947ee7671f5b36c2cd294449ff26f Mon Sep 17 00:00:00 2001 From: Mickaël Salaün Date: Tue, 10 Oct 2023 18:28:59 +0200 Subject: sys/linux: add the Landlock network rule type and access rights MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the new lanlock_net_port_attr struct and related LANDLOCK_ACCESS_NET_{BIND,CONNECT}_TCP flags for TCP access control. Add landlock_ruleset_attr's handled_access_net field and fix handled_access_fs name. Update tests with the new landlock_ruleset_attr's handled_access_net field. Signed-off-by: Mickaël Salaün --- sys/linux/test/landlock_fs_accesses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/linux/test/landlock_fs_accesses') diff --git a/sys/linux/test/landlock_fs_accesses b/sys/linux/test/landlock_fs_accesses index c7d8fc486..18a8cb983 100644 --- a/sys/linux/test/landlock_fs_accesses +++ b/sys/linux/test/landlock_fs_accesses @@ -33,7 +33,7 @@ symlinkat(&AUTO='./file2\x00', 0xffffffffffffff9c, &AUTO='./file6\x00') # Creates a ruleset to restrict all kind of file creation. -r0 = landlock_create_ruleset(&AUTO={0x1fff}, AUTO, 0x0) +r0 = landlock_create_ruleset(&AUTO={0x1fff, 0x0}, AUTO, 0x0) prctl$PR_SET_NO_NEW_PRIVS(0x26, 0x1) landlock_restrict_self(r0, 0x0) -- cgit mrf-deployment