|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
policy_module(openca,1.0.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type openca_ca_t;
|
|
Chris PeBenito |
17de1b |
type openca_ca_exec_t;
|
|
Chris PeBenito |
17de1b |
domain_type(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
domain_entry_file(openca_ca_t,openca_ca_exec_t)
|
|
Chris PeBenito |
17de1b |
role system_r types openca_ca_t;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# cjp: seems like some of these types
|
|
Chris PeBenito |
17de1b |
# can be removed and replaced with generic
|
|
Chris PeBenito |
17de1b |
# etc or usr files.
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /etc/openca standard files
|
|
Chris PeBenito |
17de1b |
type openca_etc_t;
|
|
Chris PeBenito |
17de1b |
files_type(openca_etc_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /etc/openca template files
|
|
Chris PeBenito |
17de1b |
type openca_etc_in_t;
|
|
Chris PeBenito |
17de1b |
files_type(openca_etc_in_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /etc/openca writeable (from CGI script) files
|
|
Chris PeBenito |
17de1b |
type openca_etc_writeable_t;
|
|
Chris PeBenito |
17de1b |
files_type(openca_etc_writeable_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /usr/share/openca/crypto/keys
|
|
Chris PeBenito |
17de1b |
type openca_usr_share_t;
|
|
Chris PeBenito |
17de1b |
files_type(openca_usr_share_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /var/lib/openca
|
|
Chris PeBenito |
17de1b |
type openca_var_lib_t;
|
|
Chris PeBenito |
17de1b |
files_type(openca_var_lib_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# /var/lib/openca/crypto/keys
|
|
Chris PeBenito |
17de1b |
type openca_var_lib_keys_t;
|
|
Chris PeBenito |
17de1b |
files_type(openca_var_lib_keys_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to other files under /etc/openca
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_etc_t:file r_file_perms;
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to writeable files under /etc/openca
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_etc_writeable_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_etc_writeable_t:dir manage_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to other /var/lib/openca files
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_var_lib_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_var_lib_t:dir manage_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to private CA key
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_var_lib_keys_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_var_lib_keys_t:dir manage_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to other /usr/share/openca files
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_usr_share_t:file r_file_perms;
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_usr_share_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
17de1b |
allow openca_ca_t openca_usr_share_t:dir r_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# the perl executable will be able to run a perl script
|
|
Chris PeBenito |
17de1b |
corecmd_exec_bin(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_rand(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_list_default(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
init_use_fds(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
init_use_script_fds(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
libs_exec_lib_files(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
apache_append_log(openca_ca_t)
|
|
Chris PeBenito |
17de1b |
# Allow the script to return its output
|
|
Chris PeBenito |
17de1b |
apache_rw_cache_files(openca_ca_t)
|