aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Coker <russell@coker.com.au>2019-01-19 23:04:44 +1100
committerJason Zaman <jason@perfinion.com>2019-02-10 12:11:25 +0800
commitf7cfd4adf7729be6937e3b607b254532ff41a4d6 (patch)
tree5ae3f4477220bc751348e943a934f71ca0a2de66
parentselinuxutil: Module version bump. (diff)
downloadhardened-refpolicy-f7cfd4adf7729be6937e3b607b254532ff41a4d6.tar.gz
hardened-refpolicy-f7cfd4adf7729be6937e3b607b254532ff41a4d6.tar.bz2
hardened-refpolicy-f7cfd4adf7729be6937e3b607b254532ff41a4d6.zip
more tiny stuff
I think the old timesync labelling wasn't working anyway due to -- for a directory name. A couple of patches for devicekit calling dmidecode (this is part of replacing some kmem access that was discussed on this list and rejected as a misfeature in Debian DMI related code ages ago). The rest should be obvious. Signed-off-by: Jason Zaman <jason@perfinion.com>
-rw-r--r--policy/modules/admin/dmidecode.te6
-rw-r--r--policy/modules/services/devicekit.te4
-rw-r--r--policy/modules/services/ntp.fc2
-rw-r--r--policy/modules/services/xserver.te2
-rw-r--r--policy/modules/system/unconfined.te3
5 files changed, 16 insertions, 1 deletions
diff --git a/policy/modules/admin/dmidecode.te b/policy/modules/admin/dmidecode.te
index bda30744d..3cae94b76 100644
--- a/policy/modules/admin/dmidecode.te
+++ b/policy/modules/admin/dmidecode.te
@@ -32,3 +32,9 @@ mls_file_read_all_levels(dmidecode_t)
locallogin_use_fds(dmidecode_t)
userdom_use_inherited_user_terminals(dmidecode_t)
+
+ifdef(`init_systemd',`
+ # inherits /dev/null and a socket from devicekit_disk_t
+ init_use_fds(dmidecode_t)
+ init_rw_inherited_stream_socket(dmidecode_t)
+')
diff --git a/policy/modules/services/devicekit.te b/policy/modules/services/devicekit.te
index 20c671886..8b9be93e7 100644
--- a/policy/modules/services/devicekit.te
+++ b/policy/modules/services/devicekit.te
@@ -177,6 +177,10 @@ optional_policy(`
')
optional_policy(`
+ dmidecode_domtrans(devicekit_disk_t)
+')
+
+optional_policy(`
fstools_domtrans(devicekit_disk_t)
')
diff --git a/policy/modules/services/ntp.fc b/policy/modules/services/ntp.fc
index c85ac9aaf..623451cfc 100644
--- a/policy/modules/services/ntp.fc
+++ b/policy/modules/services/ntp.fc
@@ -32,7 +32,7 @@
/var/lib/ntp(/.*)? gen_context(system_u:object_r:ntp_drift_t,s0)
/var/lib/sntp-kod(/.*)? gen_context(system_u:object_r:ntp_drift_t,s0)
/var/lib/systemd/clock -- gen_context(system_u:object_r:ntp_drift_t,s0)
-/var/lib/private/systemd/timesync(/.*)? -- gen_context(system_u:object_r:ntp_drift_t,s0)
+/var/lib/systemd/timesync(/.*)? gen_context(system_u:object_r:ntp_drift_t,s0)
/var/lock/ntpdate -- gen_context(system_u:object_r:ntpd_lock_t,s0)
diff --git a/policy/modules/services/xserver.te b/policy/modules/services/xserver.te
index 9144d701d..b48193929 100644
--- a/policy/modules/services/xserver.te
+++ b/policy/modules/services/xserver.te
@@ -291,6 +291,8 @@ kernel_request_load_module(xauth_t)
domain_use_interactive_fds(xauth_t)
+dev_read_sysfs(xauth_t)
+
files_read_etc_files(xauth_t)
files_search_pids(xauth_t)
diff --git a/policy/modules/system/unconfined.te b/policy/modules/system/unconfined.te
index d0de897fa..be9717f20 100644
--- a/policy/modules/system/unconfined.te
+++ b/policy/modules/system/unconfined.te
@@ -59,6 +59,9 @@ ifdef(`direct_sysadm_daemon',`
')
ifdef(`init_systemd',`
+ # for systemd-analyze
+ init_service_status(unconfined_t)
+
optional_policy(`
systemd_dbus_chat_resolved(unconfined_t)
')