2010-05-18 13:54:18 +00:00
|
|
|
## <summary>Plymouth graphical boot</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run plymouthd.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2010-09-20 13:05:16 +00:00
|
|
|
## <summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## Domain allowed to transition.
|
2010-09-20 13:05:16 +00:00
|
|
|
## </summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_domtrans',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_t, plymouthd_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1, plymouthd_exec_t, plymouthd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute the plymoth daemon in the current domain
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2010-09-20 13:05:16 +00:00
|
|
|
## <summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## Domain allowed access.
|
2010-09-20 13:05:16 +00:00
|
|
|
## </summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_exec',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
can_exec($1, plymouthd_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Allow domain to Stream socket connect
|
|
|
|
## to Plymouth daemon.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_stream_connect',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 plymouthd_t:unix_stream_socket connectto;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute the plymoth command in the current domain
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2010-09-20 13:05:16 +00:00
|
|
|
## <summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## Domain allowed access.
|
2010-09-20 13:05:16 +00:00
|
|
|
## </summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_exec_plymouth',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouth_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
can_exec($1, plymouth_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run plymouthd.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2010-09-20 13:05:16 +00:00
|
|
|
## <summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## Domain allowed to transition.
|
2010-09-20 13:05:16 +00:00
|
|
|
## </summary>
|
2010-05-18 13:54:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_domtrans_plymouth',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouth_t, plymouth_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1, plymouth_exec_t, plymouth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search plymouthd spool directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_search_spool',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 plymouthd_spool_t:dir search_dir_perms;
|
|
|
|
files_search_spool($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read plymouthd spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_read_spool_files',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
|
|
|
read_files_pattern($1, plymouthd_spool_t, plymouthd_spool_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## plymouthd spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_manage_spool_files',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
|
|
|
manage_files_pattern($1, plymouthd_spool_t, plymouthd_spool_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search plymouthd lib directories.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_search_lib',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 plymouthd_var_lib_t:dir search_dir_perms;
|
|
|
|
files_search_var_lib($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read plymouthd lib files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_read_lib_files',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
read_files_pattern($1, plymouthd_var_lib_t, plymouthd_var_lib_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## plymouthd lib files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_manage_lib_files',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
manage_files_pattern($1, plymouthd_var_lib_t, plymouthd_var_lib_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read plymouthd PID files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_read_pid_files',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
|
|
|
allow $1 plymouthd_var_run_t:file read_file_perms;
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to administrate
|
|
|
|
## an plymouthd environment
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
2010-09-20 13:05:16 +00:00
|
|
|
interface(`plymouthd_admin',`
|
2010-05-18 13:54:18 +00:00
|
|
|
gen_require(`
|
|
|
|
type plymouthd_t, plymouthd_spool_t, plymouthd_var_lib_t;
|
|
|
|
type plymouthd_var_run_t;
|
|
|
|
')
|
|
|
|
|
2010-09-15 08:20:36 +00:00
|
|
|
allow $1 plymouthd_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, plymouthd_t)
|
2010-05-18 13:54:18 +00:00
|
|
|
|
2010-09-20 13:36:05 +00:00
|
|
|
files_list_var_lib($1)
|
2010-05-18 13:54:18 +00:00
|
|
|
admin_pattern($1, plymouthd_spool_t)
|
|
|
|
|
|
|
|
admin_pattern($1, plymouthd_var_lib_t)
|
|
|
|
|
2010-09-20 13:36:05 +00:00
|
|
|
files_list_pids($1)
|
2010-05-18 13:54:18 +00:00
|
|
|
admin_pattern($1, plymouthd_var_run_t)
|
|
|
|
')
|