2006-05-17 14:50:31 +00:00
|
|
|
## <summary>SELinux MLS/MCS label translation service.</summary>
|
|
|
|
|
2009-11-24 14:41:03 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute setrans server in the setrans domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:10:15 +00:00
|
|
|
## Domain allowed to transition.
|
2009-11-24 14:41:03 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
#
|
|
|
|
interface(`setrans_initrc_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type setrans_initrc_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
init_labeled_script_domtrans($1, setrans_initrc_exec_t)
|
|
|
|
')
|
|
|
|
|
2006-05-17 14:50:31 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
2020-05-17 18:47:41 +00:00
|
|
|
## Allow a domain to translate contexts.
|
2006-05-17 14:50:31 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`setrans_translate_context',`
|
2020-05-17 18:47:41 +00:00
|
|
|
gen_require(`
|
|
|
|
type setrans_t, setrans_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
stream_connect_pattern($1, setrans_var_run_t, setrans_var_run_t, setrans_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_list_runtime($1)
|
2006-05-17 14:50:31 +00:00
|
|
|
')
|
2015-07-11 09:15:46 +00:00
|
|
|
|
|
|
|
######################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an setrans environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`setrans_admin',`
|
|
|
|
gen_require(`
|
|
|
|
type setrans_t, setrans_initrc_exec_t;
|
2019-09-08 20:55:02 +00:00
|
|
|
type setrans_runtime_t, setrans_unit_t;
|
2015-07-11 09:15:46 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 setrans_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, setrans_t)
|
|
|
|
|
2015-10-20 18:33:56 +00:00
|
|
|
init_startstop_service($1, $2, setrans_t, setrans_initrc_exec_t, setrans_unit_t)
|
2015-07-11 09:15:46 +00:00
|
|
|
|
2020-06-27 21:11:48 +00:00
|
|
|
files_search_runtime($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
admin_pattern($1, setrans_runtime_t)
|
2015-07-11 09:15:46 +00:00
|
|
|
')
|