selinux-policy/policy/modules/services/openca.te

86 lines
2.3 KiB
Plaintext
Raw Normal View History

2006-05-02 17:42:41 +00:00
2007-04-17 13:28:09 +00:00
policy_module(openca,1.1.0)
2006-05-02 17:42:41 +00:00
########################################
#
# Declarations
#
type openca_ca_t;
type openca_ca_exec_t;
domain_type(openca_ca_t)
domain_entry_file(openca_ca_t,openca_ca_exec_t)
role system_r types openca_ca_t;
# cjp: seems like some of these types
# can be removed and replaced with generic
# etc or usr files.
# /etc/openca standard files
type openca_etc_t;
files_type(openca_etc_t)
# /etc/openca template files
type openca_etc_in_t;
files_type(openca_etc_in_t)
# /etc/openca writeable (from CGI script) files
type openca_etc_writeable_t;
files_type(openca_etc_writeable_t)
# /usr/share/openca/crypto/keys
type openca_usr_share_t;
files_type(openca_usr_share_t)
# /var/lib/openca
type openca_var_lib_t;
files_type(openca_var_lib_t)
# /var/lib/openca/crypto/keys
type openca_var_lib_keys_t;
files_type(openca_var_lib_keys_t)
########################################
#
# Local policy
#
# Allow access to other files under /etc/openca
2006-12-12 20:08:08 +00:00
allow openca_ca_t openca_etc_t:file read_file_perms;
allow openca_ca_t openca_etc_t:dir list_dir_perms;
2006-05-02 17:42:41 +00:00
# Allow access to writeable files under /etc/openca
2006-12-12 20:08:08 +00:00
manage_dirs_pattern(openca_ca_t,openca_etc_writeable_t,openca_etc_writeable_t)
manage_files_pattern(openca_ca_t,openca_etc_writeable_t,openca_etc_writeable_t)
2006-05-02 17:42:41 +00:00
# Allow access to other /var/lib/openca files
2006-12-12 20:08:08 +00:00
manage_dirs_pattern(openca_ca_t,openca_var_lib_t,openca_var_lib_t)
manage_files_pattern(openca_ca_t,openca_var_lib_t,openca_var_lib_t)
2006-05-02 17:42:41 +00:00
# Allow access to private CA key
2006-12-12 20:08:08 +00:00
manage_dirs_pattern(openca_ca_t,openca_var_lib_keys_t,openca_var_lib_keys_t)
manage_files_pattern(openca_ca_t,openca_var_lib_keys_t,openca_var_lib_keys_t)
2006-05-02 17:42:41 +00:00
# Allow access to other /usr/share/openca files
2006-12-12 20:08:08 +00:00
read_files_pattern(openca_ca_t,openca_usr_share_t,openca_usr_share_t)
read_lnk_files_pattern(openca_ca_t,openca_usr_share_t,openca_usr_share_t)
allow openca_ca_t openca_usr_share_t:dir list_dir_perms;
2006-05-02 17:42:41 +00:00
# the perl executable will be able to run a perl script
corecmd_exec_bin(openca_ca_t)
dev_read_rand(openca_ca_t)
files_list_default(openca_ca_t)
init_use_fds(openca_ca_t)
init_use_script_fds(openca_ca_t)
libs_use_ld_so(openca_ca_t)
libs_use_shared_libs(openca_ca_t)
libs_exec_lib_files(openca_ca_t)
apache_append_log(openca_ca_t)
# Allow the script to return its output
apache_rw_cache_files(openca_ca_t)