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

Setup sudo log file type #831

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Setup sudo log file type #831

merged 1 commit into from
Nov 13, 2024

Conversation

dsugar100
Copy link
Contributor

When using the sudoers option logfile=/var/log/sudo.log it needs to create (and append) to the log file.

node=test123 type=AVC msg=audit(1731031593.322:16399): avc: denied { write } for pid=5792 comm="sudo" name="/" dev="dm-5" ino=2 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16399): avc: denied { add_name } for pid=5792 comm="sudo" name="sudo.log" scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16399): avc: denied { create } for pid=5792 comm="sudo" name="sudo.log" scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16399): avc: denied { append open } for pid=5792 comm="sudo" path="/var/log/sudo.log" dev="dm-5" ino=32 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16400): avc: denied { lock } for pid=5792 comm="sudo" path="/var/log/sudo.log" dev="dm-5" ino=32 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16401): avc: denied { getattr } for pid=5792 comm="sudo" path="/var/log/sudo.log" dev="dm-5" ino=32 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1

When using the sudoers option logfile=/var/log/sudo.log it needs to create (and append) to the log file.

node=test123 type=AVC msg=audit(1731031593.322:16399): avc:  denied  { write } for  pid=5792 comm="sudo" name="/" dev="dm-5" ino=2 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16399): avc:  denied  { add_name } for  pid=5792 comm="sudo" name="sudo.log" scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16399): avc:  denied  { create } for  pid=5792 comm="sudo" name="sudo.log" scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16399): avc:  denied  { append open } for  pid=5792 comm="sudo" path="/var/log/sudo.log" dev="dm-5" ino=32 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16400): avc:  denied  { lock } for  pid=5792 comm="sudo" path="/var/log/sudo.log" dev="dm-5" ino=32 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1
node=test123 type=AVC msg=audit(1731031593.322:16401): avc:  denied  { getattr } for  pid=5792 comm="sudo" path="/var/log/sudo.log" dev="dm-5" ino=32 scontext=toor_u:staff_r:staff_sudo_t:s0 tcontext=toor_u:object_r:var_log_t:s0 tclass=file permissive=1

Signed-off-by: Dave Sugar <dsugar100@gmail.com>
@pebenito pebenito merged commit cc6ce5d into SELinuxProject:main Nov 13, 2024
118 checks 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