execve silently blocked
I am writing an SELinux policy for a daemon that needs to exec an external program. The execve call is being denied (permission denied), but no denial is being logged, even after disabling dontaudit rules (semodule -DB).
(The execve call does succeed in permissive mode.)
How can I troubleshoot this?
Thanks!
Signature · 4 lines
======================================================================== Ian Pilcher [email protected] -------- "I grew up before Mark Zuckerberg invented friendship" -------- ========================================================================
Quoted 4 lines · Ian Pilcher
I am writing an SELinux policy for a daemon that needs to exec an external program. The execve call is being denied (permission denied), but no denial is being logged, even after disabling dontaudit rules (semodule -DB).
Are you also looking for "selinux_err" records?
ausearch -m avc,user_avc,selinux_err -i
will return avc, user_avc and selinux_err records if auditd is running.
Quoted 12 lines
(The execve call does succeed in permissive mode.)
How can I troubleshoot this?
Thanks!
Signature · 4 lines
======================================================================== Ian Pilcher [email protected] -------- "I grew up before Mark Zuckerberg invented friendship" -------- ========================================================================
Signature · 3 lines
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02 https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02 Dominick Grift
Quoted 1 line · Dominick Grift
Are you also looking for "
selinux_err" records?
Nope, because I had never heard of them before. :-)
That found the error:
type=SELINUX_ERR msg=audit(1570044939.773:845):
op=security_compute_sid invalid_context=system_u:system_r:denatc_sudo_t:s0 scontext=system_u:system_r:denatc_t:s0 tcontext=system_u:object_r:sudo_exec_t:s0 tclass=process
It seems that I was missing a role-type statement:
role system_r types denatc_sudo_t;
Adding that gets me back to more conventional denials, which I know how to deal with.
Thanks!
Signature · 4 lines
======================================================================== Ian Pilcher [email protected] -------- "I grew up before Mark Zuckerberg invented friendship" -------- ========================================================================