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_ptrace | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/linux/test/landlock_ptrace') diff --git a/sys/linux/test/landlock_ptrace b/sys/linux/test/landlock_ptrace index ad63f3e5c..aca5afa79 100644 --- a/sys/linux/test/landlock_ptrace +++ b/sys/linux/test/landlock_ptrace @@ -11,7 +11,7 @@ r0 = syz_clone(0x11, 0x0, 0x0, 0x0, 0x0, 0x0) ptrace(0x10, r0) ptrace(0x11, r0) -r1 = landlock_create_ruleset(&AUTO={0x100}, AUTO, 0x0) +r1 = landlock_create_ruleset(&AUTO={0x100, 0x0}, AUTO, 0x0) landlock_restrict_self(r1, 0x0) r2 = syz_clone(0x11, 0x0, 0x0, 0x0, 0x0, 0x0) @@ -22,7 +22,7 @@ ptrace(0x11, r0) ptrace(0x10, r2) ptrace(0x11, r2) -r3 = landlock_create_ruleset(&AUTO={0x100}, AUTO, 0x0) +r3 = landlock_create_ruleset(&AUTO={0x100, 0x0}, AUTO, 0x0) landlock_restrict_self(r3, 0x0) ptrace(0x10, r0) -- cgit mrf-deployment