aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'policy/modules/contrib/uuidd.if')
-rw-r--r--policy/modules/contrib/uuidd.if190
1 files changed, 190 insertions, 0 deletions
diff --git a/policy/modules/contrib/uuidd.if b/policy/modules/contrib/uuidd.if
new file mode 100644
index 00000000..5d43bd56
--- /dev/null
+++ b/policy/modules/contrib/uuidd.if
@@ -0,0 +1,190 @@
+## <summary>policy for uuidd</summary>
+
+########################################
+## <summary>
+## Transition to uuidd.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`uuidd_domtrans',`
+ gen_require(`
+ type uuidd_t, uuidd_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ domtrans_pattern($1, uuidd_exec_t, uuidd_t)
+')
+
+########################################
+## <summary>
+## Execute uuidd server in the uuidd domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_initrc_domtrans',`
+ gen_require(`
+ type uuidd_initrc_exec_t;
+ ')
+
+ init_labeled_script_domtrans($1, uuidd_initrc_exec_t)
+')
+
+########################################
+## <summary>
+## Search uuidd lib directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_search_lib',`
+ gen_require(`
+ type uuidd_var_lib_t;
+ ')
+
+ allow $1 uuidd_var_lib_t:dir search_dir_perms;
+ files_search_var_lib($1)
+')
+
+########################################
+## <summary>
+## Read uuidd lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_read_lib_files',`
+ gen_require(`
+ type uuidd_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ read_files_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t)
+')
+
+########################################
+## <summary>
+## Manage uuidd lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_manage_lib_files',`
+ gen_require(`
+ type uuidd_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ manage_files_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t)
+')
+
+########################################
+## <summary>
+## Manage uuidd lib directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_manage_lib_dirs',`
+ gen_require(`
+ type uuidd_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ manage_dirs_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t)
+')
+
+########################################
+## <summary>
+## Read uuidd PID files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_read_pid_files',`
+ gen_require(`
+ type uuidd_var_run_t;
+ ')
+
+ files_search_pids($1)
+ allow $1 uuidd_var_run_t:file read_file_perms;
+')
+
+########################################
+## <summary>
+## Connect to uuidd over an unix stream socket.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`uuidd_stream_connect_manager',`
+ gen_require(`
+ type uuidd_t, uuidd_var_run_t;
+ ')
+
+ files_search_pids($1)
+ stream_connect_pattern($1, uuidd_var_run_t, uuidd_var_run_t, uuidd_t)
+')
+
+########################################
+## <summary>
+## All of the rules required to administrate
+## an uuidd environment
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <param name="role">
+## <summary>
+## Role allowed access.
+## </summary>
+## </param>
+## <rolecap/>
+#
+interface(`uuidd_admin',`
+ gen_require(`
+ type uuidd_t, uuidd_initrc_exec_t;
+ type uuidd_var_run_t, uuidd_var_lib_t;
+ ')
+
+ allow $1 uuidd_t:process signal_perms;
+ ps_process_pattern($1, uuidd_t)
+
+ uuidd_initrc_domtrans($1)
+ domain_system_change_exemption($1)
+ role_transition $2 uuidd_initrc_exec_t system_r;
+ allow $2 system_r;
+
+ files_search_var_lib($1)
+ admin_pattern($1, uuidd_var_lib_t)
+
+ files_search_pids($1)
+ admin_pattern($1, uuidd_var_run_t)
+')