policy: allow testsuite caller domain to ptrace testsuite processes
PATCH 1/1 policy: allow testsuite caller domain to ptrace testsuite processes
While this is not required for the testsuite execution itself, it is useful when debugging by prepending commands with 'strace ...'. Testsuite domains outside domain_type() aren't allowed to be ptraced by other domains, so the permission needs to be allowed explicitly in the testsuite policy.
--- policy/test_global.te | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
policy/test_global.te +3 -1
@@ -69,7 +69,9 @@ optional_policy(` # Needed for domains outside domain_type() dontaudit testsuite_caller_domain testsuite_domain:process { noatsecure rlimitinh siginh }; -allow testsuite_caller_domain testsuite_domain:process sigkill; +# ptrace - only needed for debugging (e.g. strace) +# sigkill - needed for some tests to pass +allow testsuite_caller_domain testsuite_domain:process { ptrace sigkill }; # keys test may trigger search AVCs for root's keys dontaudit testsuite_domain testsuite_caller_domain:key { search };
Signature · 1 line
2.51.1
Quoted 8 lines · Ondrej Mosnacek
While this is not required for the testsuite execution itself, it is useful when debugging by prepending commands with 'strace ...'. Testsuite domains outside
domain_type()aren't allowed to be ptraced by other domains, so the permission needs to be allowed explicitly in the testsuite policy.Signed-off-by Ondrej Mosnacek <[email protected]>
Quoted 23 lines
--- policy/test_global.te | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)policy/test_global.te +3
-2@@ -69,7 +69,9 @@ optional_policy(` # Needed for domains outside domain_type() dontaudit testsuite_caller_domain testsuite_domain:process { noatsecure rlimitinh siginh }; -allow testsuite_caller_domain testsuite_domain:process sigkill; +# ptrace - only needed for debugging (e.g. strace) +# sigkill - needed for some tests to pass +allow testsuite_caller_domain testsuite_domain:process { ptrace sigkill }; # keys test may trigger search AVCs for root's keys dontaudit testsuite_domain testsuite_caller_domain:key { search }; --2.51.1
Ondrej Mosnacek
AppliedQuoted 9 lines · Stephen Smalley
Quoted 7 lines · Ondrej Mosnacek
While this is not required for the testsuite execution itself, it is useful when debugging by prepending commands with 'strace ...'. Testsuite domains outside
domain_type()aren't allowed to be ptraced by other domains, so the permission needs to be allowed explicitly in the testsuite policy.
Quoted 3 lines
Quoted 1 line
Signed-off-by Ondrej Mosnacek <[email protected]>Acked-by Stephen Smalley <[email protected]>
Thanks, applied:
https://github.com/SELinuxProject/selinux-testsuite/commit/02f55421df28861a1f8292123e530303757329d0
Signature · 3 lines
Ondrej Mosnacek Senior Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.