diff --git a/policy/modules/system/init.if b/policy/modules/system/init.if index 87e937ff5..f941e57ee 100644 --- a/policy/modules/system/init.if +++ b/policy/modules/system/init.if @@ -1400,7 +1400,7 @@ interface(`init_manage_pid_symlinks', ` ###################################### ## -## Create and write files in the /run/systemd directory. +## Create files in the /run/systemd directory. ## ## ## @@ -1408,12 +1408,30 @@ interface(`init_manage_pid_symlinks', ` ## ## # -interface(`init_create_write_pid_files', ` +interface(`init_create_pid_files', ` gen_require(` type init_runtime_t; ') - allow $1 init_runtime_t:file { create_file_perms write }; + allow $1 init_runtime_t:file create_file_perms; +') + +###################################### +## +## Write files in the /run/systemd directory. +## +## +## +## Domain allowed access. +## +## +# +interface(`init_write_pid_files', ` + gen_require(` + type init_runtime_t; + ') + + allow $1 init_runtime_t:file write_file_perms; ') ###################################### diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te index 2ccd593c8..e2f8d9ad7 100644 --- a/policy/modules/system/systemd.te +++ b/policy/modules/system/systemd.te @@ -274,10 +274,11 @@ files_search_pids(systemd_fstab_generator_t) fstools_exec(systemd_fstab_generator_t) -init_create_write_pid_files(systemd_fstab_generator_t) +init_create_pid_files(systemd_fstab_generator_t) init_manage_pid_dirs(systemd_fstab_generator_t) init_manage_pid_symlinks(systemd_fstab_generator_t) init_search_pids(systemd_fstab_generator_t) +init_write_pid_files(systemd_fstab_generator_t) kernel_read_kernel_sysctls(systemd_fstab_generator_t)