diff --git a/policy/modules/services/ntp.te b/policy/modules/services/ntp.te index a95bf21d0..982d6a4ce 100644 --- a/policy/modules/services/ntp.te +++ b/policy/modules/services/ntp.te @@ -138,10 +138,13 @@ userdom_dontaudit_use_unpriv_user_fds(ntpd_t) userdom_list_user_home_dirs(ntpd_t) ifdef(`init_systemd',` + allow ntpd_t ntpd_unit_t:file read_file_perms; + dbus_system_bus_client(ntpd_t) dbus_connect_system_bus(ntpd_t) init_dbus_chat(ntpd_t) init_get_system_status(ntpd_t) + init_list_unit_dirs(ntpd_t) # for /var/lib/systemd/timesync init_read_var_lib_links(ntpd_t) allow ntpd_t self:capability { fowner setpcap }; diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index 2a17910ed..be2c0a70a 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -2960,6 +2960,26 @@ interface(`init_search_units',` fs_search_tmpfs($1) ') +###################################### +## +## List systemd unit dirs. +## +## +## +## Domain allowed access. +## +## +# +interface(`init_list_unit_dirs',` + gen_require(` + type systemd_unit_t; + ') + + allow $1 systemd_unit_t:dir list_dir_perms; + + init_search_units($1) +') + ######################################## ## ## Read systemd unit links