Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve teampass cron detection. #4446

Conversation

corentin-soriano
Copy link
Contributor

This change allows administrators to disable the exec() function without break teampass (disable_functions in php.ini).

This also avoids SELinux AVC in audit logs:

type=AVC msg=audit(1730880782.169:329): avc:  denied  { read } for  pid=10249 comm="unix_chkpwd" name="shadow" dev="dm-0" ino=16812627 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file permissive=1
type=AVC msg=audit(1730880782.169:329): avc:  denied  { open } for  pid=10249 comm="unix_chkpwd" path="/etc/shadow" dev="dm-0" ino=16812627 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file permissive=1
type=AVC msg=audit(1730880782.169:330): avc:  denied  { getattr } for  pid=10249 comm="unix_chkpwd" path="/etc/shadow" dev="dm-0" ino=16812627 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file permissive=1
type=AVC msg=audit(1730880782.170:331): avc:  denied  { nlmsg_relay } for  pid=10248 comm="crontab" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=netlink_audit_socket permissive=1
type=AVC msg=audit(1730880782.170:331): avc:  denied  { audit_write } for  pid=10248 comm="crontab" capability=29  scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=capability permissive=1
type=AVC msg=audit(1730880782.170:334): avc:  denied  { open } for  pid=10248 comm="crontab" path="/var/spool/cron/httpd" dev="dm-0" ino=16971141 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:user_cron_spool_t:s0 tclass=file permissive=1

@nilsteampassnet nilsteampassnet merged commit e3318a4 into nilsteampassnet:master Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants