Skip to content

Commit c3345b6

Browse files
committed
systemd: allow tmpfiles to handle auditd_log_t
audit installs a tmpfiles.d file for /var/log/audit [0]: ``` AVC avc: denied { relabelfrom } for pid=1439 comm="systemd-tmpfile" name="audit" dev="dm-0" ino=1246029 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:auditd_log_t:s0 tclass=dir AVC avc: denied { relabelto } for pid=1439 comm="systemd-tmpfile" name="audit" dev="dm-0" ino=1246029 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:auditd_log_t:s0 tclass=dir ``` An explicit allow is needed because auditd_log_t is a security_file. [0] linux-audit/audit-userspace@eb3a9a6 Signed-off-by: Sam James <sam@gentoo.org>
1 parent 041c9a6 commit c3345b6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

policy/modules/system/systemd.te

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,14 @@ tunable_policy(`systemd_tmpfiles_manage_all',`
22682268
files_relabel_non_security_files(systemd_tmpfiles_t)
22692269
')
22702270

2271+
optional_policy(`
2272+
gen_require(`
2273+
type auditd_log_t;
2274+
')
2275+
2276+
allow systemd_tmpfiles_t auditd_log_t:dir { create_dir_perms relabel_dir_perms };
2277+
')
2278+
22712279
optional_policy(`
22722280
dbus_manage_lib_files(systemd_tmpfiles_t)
22732281
dbus_relabel_lib_dirs(systemd_tmpfiles_t)

0 commit comments

Comments
 (0)