diff options
author | Sugar, David <dsugar@tresys.com> | 2020-01-22 12:35:42 +0000 |
---|---|---|
committer | Jason Zaman <perfinion@gentoo.org> | 2020-02-15 15:32:05 +0800 |
commit | 5668039ba3897f9ca837387d67b039e51fe1e41b (patch) | |
tree | b5c2a74ef8a2a1286a8626757066f1d30984309d /policy/modules/system/systemd.if | |
parent | Allow systemd to getattr all files (diff) | |
download | hardened-refpolicy-5668039ba3897f9ca837387d67b039e51fe1e41b.tar.gz hardened-refpolicy-5668039ba3897f9ca837387d67b039e51fe1e41b.tar.bz2 hardened-refpolicy-5668039ba3897f9ca837387d67b039e51fe1e41b.zip |
audit daemon can halt system, allow this to happen.
auditd can halt the system for several reasons based on configuration.
These mostly revovle around audit partition full issues. I am seeing
the following denials when attempting to halt the system.
Jan 12 03:38:48 localhost audispd: node=localhost type=USER_AVC msg=audit(1578800328.122:1943): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { start } for auid=n/a uid=0 gid=0 path="/usr/lib/systemd/system/poweroff.target" cmdline="/sbin/init 0" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:power_unit_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Jan 12 03:38:48 localhost audispd: node=localhost type=USER_AVC msg=audit(1578800328.147:1944): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='avc: denied { status } for auid=n/a uid=0 gid=0 path="/usr/lib/systemd/system/poweroff.target" cmdline="/sbin/init 0" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:power_unit_t:s0 tclass=service exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'
Jan 12 04:44:54 localhost audispd: node=localhost type=AVC msg=audit(1578804294.103:1923): avc: denied { getattr } for pid=6936 comm="systemctl" path="/run/systemd/system" dev="tmpfs" ino=45 scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:object_r:systemd_unit_t:s0 tclass=dir permissive=1
v2 - use optional rather than ifdef
v3 - fix order
Signed-off-by: Dave Sugar <dsugar@tresys.com>
Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'policy/modules/system/systemd.if')
-rw-r--r-- | policy/modules/system/systemd.if | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if index 8f50e39e..4dd26458 100644 --- a/policy/modules/system/systemd.if +++ b/policy/modules/system/systemd.if @@ -821,6 +821,26 @@ interface(`systemd_start_power_units',` ######################################## ## <summary> +## Get the system status information about power units +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`systemd_status_power_units',` + gen_require(` + type power_unit_t; + class service status; + ') + + allow $1 power_unit_t:service status; +') + + +######################################## +## <summary> ## Make the specified type usable for ## systemd tmpfiles config files. ## </summary> |