diff options
Diffstat (limited to 'policy/modules/contrib/tcsd.if')
-rw-r--r-- | policy/modules/contrib/tcsd.if | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/policy/modules/contrib/tcsd.if b/policy/modules/contrib/tcsd.if new file mode 100644 index 000000000..595f5a7e7 --- /dev/null +++ b/policy/modules/contrib/tcsd.if @@ -0,0 +1,150 @@ +## <summary>TSS Core Services (TCS) daemon (tcsd) policy</summary> + +######################################## +## <summary> +## Execute a domain transition to run tcsd. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`tcsd_domtrans',` + gen_require(` + type tcsd_t, tcsd_exec_t; + ') + + domtrans_pattern($1, tcsd_exec_t, tcsd_t) +') + +######################################## +## <summary> +## Execute tcsd server in the tcsd domain. +## </summary> +## <param name="domain"> +## <summary> +## The type of the process performing this action. +## </summary> +## </param> +# +interface(`tcsd_initrc_domtrans',` + gen_require(` + type tcsd_initrc_exec_t; + ') + + init_labeled_script_domtrans($1, tcsd_initrc_exec_t) +') + +######################################## +## <summary> +## Search tcsd lib directories. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`tcsd_search_lib',` + gen_require(` + type tcsd_var_lib_t; + ') + + allow $1 tcsd_var_lib_t:dir search_dir_perms; + files_search_var_lib($1) +') + +######################################## +## <summary> +## Manage tcsd lib dirs files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`tcsd_manage_lib_dirs',` + gen_require(` + type tcsd_var_lib_t; + ') + + files_search_var_lib($1) + manage_dirs_pattern($1, tcsd_var_lib_t, tcsd_var_lib_t) +') + +######################################## +## <summary> +## Read tcsd lib files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`tcsd_read_lib_files',` + gen_require(` + type tcsd_var_lib_t; + ') + + files_search_var_lib($1) + read_files_pattern($1, tcsd_var_lib_t, tcsd_var_lib_t) +') + +######################################## +## <summary> +## Create, read, write, and delete +## tcsd lib files. +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +# +interface(`tcsd_manage_lib_files',` + gen_require(` + type tcsd_var_lib_t; + ') + + files_search_var_lib($1) + manage_files_pattern($1, tcsd_var_lib_t, tcsd_var_lib_t) +') + +######################################## +## <summary> +## All of the rules required to administrate +## an tcsd environment +## </summary> +## <param name="domain"> +## <summary> +## Domain allowed access. +## </summary> +## </param> +## <param name="role"> +## <summary> +## Role allowed access. +## </summary> +## </param> +## <rolecap/> +# +interface(`tcsd_admin',` + gen_require(` + type tcsd_t; + type tcsd_initrc_exec_t; + type tcsd_var_lib_t; + ') + + allow $1 tcsd_t:process { ptrace signal_perms }; + ps_process_pattern($1, tcsd_t) + + tcsd_initrc_domtrans($1) + domain_system_change_exemption($1) + role_transition $2 tcsd_initrc_exec_t system_r; + allow $2 system_r; + + files_search_var_lib($1) + admin_pattern($1, tcsd_var_lib_t) +') |