init: split init_create_pid_files interface

This commit is contained in:
bauen1 2020-02-08 16:16:14 +01:00
parent 2b5d1b8299
commit 79ab984197
No known key found for this signature in database
GPG Key ID: FF0AAF5E0812BA9C
2 changed files with 23 additions and 4 deletions

View File

@ -1400,7 +1400,7 @@ interface(`init_manage_pid_symlinks', `
######################################
## <summary>
## Create and write files in the /run/systemd directory.
## Create files in the /run/systemd directory.
## </summary>
## <param name="domain">
## <summary>
@ -1408,12 +1408,30 @@ interface(`init_manage_pid_symlinks', `
## </summary>
## </param>
#
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;
')
######################################
## <summary>
## Write files in the /run/systemd directory.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`init_write_pid_files', `
gen_require(`
type init_runtime_t;
')
allow $1 init_runtime_t:file write_file_perms;
')
######################################

View File

@ -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)