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

Sd logind dontaudit unlink #2551

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions policy/modules/kernel/files.if
Original file line number Diff line number Diff line change
Expand Up @@ -10452,6 +10452,48 @@ interface(`files_dontaudit_write_all_files',`
dontaudit $1 file_type:dir_file_class_set write;
')

########################################
## <summary>
## Do not audit attempts to unlink all files.
## </summary>
## <param name="domain">
## <summary>
## Domain to not audit.
## </summary>
## </param>
#
interface(`files_dontaudit_delete_all_files',`
gen_require(`
attribute file_type;
')

dontaudit $1 file_type:dir unlink;
dontaudit $1 file_type:file unlink;
dontaudit $1 file_type:lnk_file unlink;
dontaudit $1 file_type:fifo_file unlink;
dontaudit $1 file_type:sock_file unlink;
dontaudit $1 file_type:chr_file unlink;
dontaudit $1 file_type:blk_file unlink;
')

########################################
## <summary>
## Do not audit attempts to read all directories.
## </summary>
## <param name="domain">
## <summary>
## Domain to not audit.
## </summary>
## </param>
#
interface(`files_dontaudit_read_all_dirs',`
gen_require(`
attribute file_type;
')

dontaudit $1 file_type:dir read;
')

########################################
## <summary>
## Allow domain to delete to all files
Expand Down
2 changes: 2 additions & 0 deletions policy/modules/system/systemd.te
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ mls_dbus_send_all_levels(systemd_logind_t)

files_delete_tmpfs_files(systemd_logind_t)
fs_delete_tmpfs_dirs(systemd_logind_t)
files_dontaudit_delete_all_files(systemd_logind_t)
files_dontaudit_read_all_dirs(systemd_logind_t)

fs_mount_tmpfs(systemd_logind_t)
fs_unmount_tmpfs(systemd_logind_t)
Expand Down