logging, systemd: allow relabelfrom,relabelto on systemd journal
files by systemd-journald journald's journal-offline will relabel log files. It should be noted however that this happens even if the files already have the correct label. avc: granted { relabelfrom } for pid=11440 comm="journal-offline" name=".#system@97c1c6b7d7ed4333b671d09d9deee851-00000000003d4f26-0005f63f0972fd4c.journalb23e70204ab1737e" dev="dm-0" ino=418415 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:systemd_journal_t:s0 tclass=file permissive=0 avc: granted { relabelto } for pid=11440 comm="journal-offline" name=".#system@97c1c6b7d7ed4333b671d09d9deee851-00000000003d4f26-0005f63f0972fd4c.journalb23e70204ab1737e" dev="dm-0" ino=418415 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:systemd_journal_t:s0 tclass=file permissive=0 Signed-off-by: Kenton Groombridge <me@concord.sh>
This commit is contained in:
parent
02e558be0f
commit
eed80c888c
@ -566,6 +566,8 @@ ifdef(`init_systemd',`
|
||||
|
||||
systemd_manage_journal_files(syslogd_t)
|
||||
systemd_watch_journal_dirs(syslogd_t)
|
||||
systemd_relabelfrom_journal_files(syslogd_t)
|
||||
systemd_relabelto_journal_files(syslogd_t)
|
||||
|
||||
udev_read_runtime_files(syslogd_t)
|
||||
|
||||
|
@ -1775,6 +1775,24 @@ interface(`systemd_watch_journal_dirs',`
|
||||
allow $1 systemd_journal_t:dir watch;
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Relabel from systemd-journald file type.
|
||||
## </summary>
|
||||
## <param name="domain">
|
||||
## <summary>
|
||||
## Domain allowed access.
|
||||
## </summary>
|
||||
## </param>
|
||||
#
|
||||
interface(`systemd_relabelfrom_journal_files',`
|
||||
gen_require(`
|
||||
type systemd_journal_t;
|
||||
')
|
||||
|
||||
allow $1 systemd_journal_t:file relabelfrom_file_perms;
|
||||
')
|
||||
|
||||
########################################
|
||||
## <summary>
|
||||
## Relabel to systemd-journald directory type.
|
||||
|
Loading…
Reference in New Issue
Block a user