## Plymouth graphical boot
########################################
##
## Execute a domain transition to run plymouthd.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`plymouthd_domtrans', `
gen_require(`
type plymouthd_t, plymouthd_exec_t;
')
domtrans_pattern($1, plymouthd_exec_t, plymouthd_t)
')
########################################
##
## Execute the plymoth daemon in the current domain
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_exec', `
gen_require(`
type plymouthd_exec_t;
')
can_exec($1, plymouthd_exec_t)
')
########################################
##
## Allow domain to Stream socket connect
## to Plymouth daemon.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_stream_connect', `
gen_require(`
type plymouthd_t;
')
allow $1 plymouthd_t:unix_stream_socket connectto;
')
########################################
##
## Execute the plymoth command in the current domain
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_exec_plymouth', `
gen_require(`
type plymouth_exec_t;
')
can_exec($1, plymouth_exec_t)
')
########################################
##
## Execute a domain transition to run plymouthd.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`plymouthd_domtrans_plymouth', `
gen_require(`
type plymouth_t, plymouth_exec_t;
')
domtrans_pattern($1, plymouth_exec_t, plymouth_t)
')
########################################
##
## Search plymouthd spool directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_search_spool', `
gen_require(`
type plymouthd_spool_t;
')
allow $1 plymouthd_spool_t:dir search_dir_perms;
files_search_spool($1)
')
########################################
##
## Read plymouthd spool files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_read_spool_files',`
gen_require(`
type plymouthd_spool_t;
')
files_search_spool($1)
read_files_pattern($1, plymouthd_spool_t, plymouthd_spool_t)
')
########################################
##
## Create, read, write, and delete
## plymouthd spool files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_manage_spool_files', `
gen_require(`
type plymouthd_spool_t;
')
files_search_spool($1)
manage_files_pattern($1, plymouthd_spool_t, plymouthd_spool_t)
')
########################################
##
## Search plymouthd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_search_lib', `
gen_require(`
type plymouthd_var_lib_t;
')
allow $1 plymouthd_var_lib_t:dir search_dir_perms;
files_search_var_lib($1)
')
########################################
##
## Read plymouthd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_read_lib_files', `
gen_require(`
type plymouthd_var_lib_t;
')
files_search_var_lib($1)
read_files_pattern($1, plymouthd_var_lib_t, plymouthd_var_lib_t)
')
########################################
##
## Create, read, write, and delete
## plymouthd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_manage_lib_files', `
gen_require(`
type plymouthd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, plymouthd_var_lib_t, plymouthd_var_lib_t)
')
########################################
##
## Read plymouthd PID files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_read_pid_files', `
gen_require(`
type plymouthd_var_run_t;
')
files_search_pids($1)
allow $1 plymouthd_var_run_t:file read_file_perms;
')
########################################
##
## Allow the specified domain to read
## to plymouthd log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_read_log',`
gen_require(`
type plymouthd_var_log_t;
')
logging_search_logs($1)
read_files_pattern($1, plymouthd_var_log_t, plymouthd_var_log_t)
')
#####################################
##
## Allow the specified domain to create plymouthd's log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_create_log',`
gen_require(`
type plymouthd_var_log_t;
')
logging_search_logs($1)
create_files_pattern($1, plymouthd_var_log_t, plymouthd_var_log_t)
')
########################################
##
## Allow the specified domain to manage
## to plymouthd log files.
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_manage_log',`
gen_require(`
type plymouthd_var_log_t;
')
logging_search_logs($1)
manage_dirs_pattern($1, plymouthd_var_log_t, plymouthd_var_log_t)
manage_files_pattern($1, plymouthd_var_log_t, plymouthd_var_log_t)
read_lnk_files_pattern($1, plymouthd_var_log_t, plymouthd_var_log_t)
')
#######################################
##
## Allow domain to create boot.log
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_filetrans_named_content',`
gen_require(`
type plymouthd_var_log_t;
')
logging_log_named_filetrans($1, plymouthd_var_log_t, file, "boot.log")
')
########################################
##
## All of the rules required to administrate
## an plymouthd environment
##
##
##
## Domain allowed access.
##
##
#
interface(`plymouthd_admin', `
gen_require(`
type plymouthd_t, plymouthd_spool_t, plymouthd_var_lib_t;
type plymouthd_var_run_t;
')
allow $1 plymouthd_t:process signal_perms;
ps_process_pattern($1, plymouthd_t)
tunable_policy(`deny_ptrace',`',`
allow $1 plymouthd_t:process ptrace;
')
files_list_var_lib($1)
admin_pattern($1, plymouthd_spool_t)
admin_pattern($1, plymouthd_var_lib_t)
files_list_pids($1)
admin_pattern($1, plymouthd_var_run_t)
')