diff options
-rw-r--r-- | policy/modules/system/init.if | 20 | ||||
-rw-r--r-- | policy/modules/system/systemd.te | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index 3e4192eb4..597fd169a 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -3860,6 +3860,26 @@ interface(`init_list_all_units',` ######################################## ## <summary> +## Get the attributes of systemd unit directories and the files in them. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`init_getattr_all_unit_files',` + gen_require(` + attribute systemdunit; + ') + + list_dirs_pattern($1, systemdunit, systemdunit) + getattr_files_pattern($1, systemdunit, systemdunit) + read_lnk_files_pattern($1, systemdunit, systemdunit) +') + +######################################## +## <summary> ## Manage systemd unit dirs and the files in them ## </summary> ## <param name="domain"> diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te index 63fef177b..e3af88033 100644 --- a/policy/modules/system/systemd.te +++ b/policy/modules/system/systemd.te @@ -536,10 +536,11 @@ init_rename_runtime_files(systemd_generator_t) init_search_runtime(systemd_generator_t) init_setattr_runtime_files(systemd_generator_t) init_write_runtime_files(systemd_generator_t) -init_list_all_units(systemd_generator_t) init_read_generic_units_files(systemd_generator_t) init_read_generic_units_symlinks(systemd_generator_t) init_read_script_files(systemd_generator_t) +init_getattr_all_unit_files(systemd_generator_t) +init_getattr_all_script_files(systemd_generator_t) kernel_use_fds(systemd_generator_t) kernel_read_system_state(systemd_generator_t) |