Craig Grube e87791
Chris PeBenito e6d8fd
policy_module(puppet, 1.0.0)
Craig Grube e87791
Craig Grube e87791
########################################
Craig Grube e87791
#
Craig Grube e87791
# Declarations
Craig Grube e87791
#
Craig Grube e87791
Craig Grube e87791
## <desc>
Craig Grube e87791
## 

Craig Grube e87791
## Allow Puppet client to manage all file
Craig Grube e87791
## types.
Craig Grube e87791
## 

Craig Grube e87791
## </desc>
Craig Grube e87791
gen_tunable(puppet_manage_all_files, false)
Craig Grube e87791
Craig Grube e87791
type puppet_t;
Craig Grube e87791
type puppet_exec_t;
Craig Grube e87791
init_daemon_domain(puppet_t, puppet_exec_t)
Craig Grube e87791
Chris PeBenito e6d8fd
type puppet_etc_t;
Chris PeBenito e6d8fd
files_config_file(puppet_etc_t)
Chris PeBenito e6d8fd
Craig Grube e87791
type puppet_initrc_exec_t;
Chris PeBenito e6d8fd
init_script_file(puppet_initrc_exec_t)
Craig Grube e87791
Craig Grube e87791
type puppet_log_t;
Craig Grube e87791
logging_log_file(puppet_log_t)
Craig Grube e87791
Chris PeBenito e6d8fd
type puppet_tmp_t;
Chris PeBenito e6d8fd
files_tmp_file(puppet_tmp_t)
Chris PeBenito e6d8fd
Craig Grube e87791
type puppet_var_lib_t;
Craig Grube e87791
files_type(puppet_var_lib_t)
Craig Grube e87791
Craig Grube e87791
type puppet_var_run_t;
Craig Grube e87791
files_pid_file(puppet_var_run_t)
Craig Grube e87791
Craig Grube e87791
type puppetmaster_t;
Craig Grube e87791
type puppetmaster_exec_t;
Craig Grube e87791
init_daemon_domain(puppetmaster_t, puppetmaster_exec_t)
Craig Grube e87791
Chris PeBenito e6d8fd
type puppetmaster_initrc_exec_t;
Chris PeBenito e6d8fd
init_script_file(puppetmaster_initrc_exec_t)
Craig Grube e87791
Craig Grube e87791
type puppetmaster_tmp_t;
Craig Grube e87791
files_tmp_file(puppetmaster_tmp_t)
Craig Grube e87791
Craig Grube e87791
########################################
Craig Grube e87791
#
Craig Grube e87791
# Puppet personal policy
Craig Grube e87791
#
Craig Grube e87791
Craig Grube e87791
allow puppet_t self:capability { fowner fsetid setuid setgid dac_override sys_nice sys_ptrace sys_tty_config };
Chris PeBenito e6d8fd
allow puppet_t self:process { signal signull getsched setsched };
Craig Grube e87791
allow puppet_t self:fifo_file rw_fifo_file_perms;
Craig Grube e87791
allow puppet_t self:netlink_route_socket create_netlink_socket_perms;
Craig Grube e87791
allow puppet_t self:tcp_socket create_stream_socket_perms;
Craig Grube e87791
allow puppet_t self:udp_socket create_socket_perms;
Craig Grube e87791
Craig Grube e87791
read_files_pattern(puppet_t, puppet_etc_t, puppet_etc_t)
Craig Grube e87791
Chris PeBenito e6d8fd
manage_dirs_pattern(puppet_t, puppet_var_lib_t, puppet_var_lib_t)
Craig Grube e87791
manage_files_pattern(puppet_t, puppet_var_lib_t, puppet_var_lib_t)
Chris PeBenito e6d8fd
files_search_var_lib(puppet_t)
Craig Grube e87791
Craig Grube e87791
setattr_dirs_pattern(puppet_t, puppet_var_run_t, puppet_var_run_t)
Craig Grube e87791
manage_files_pattern(puppet_t, puppet_var_run_t, puppet_var_run_t)
Craig Grube e87791
files_pid_filetrans(puppet_t, puppet_var_run_t, { file dir })
Craig Grube e87791
Craig Grube e87791
create_dirs_pattern(puppet_t, var_log_t, puppet_log_t)
Craig Grube e87791
create_files_pattern(puppet_t, puppet_log_t, puppet_log_t)
Craig Grube e87791
append_files_pattern(puppet_t, puppet_log_t, puppet_log_t)
Craig Grube e87791
logging_log_filetrans(puppet_t, puppet_log_t, { file dir })
Craig Grube e87791
Craig Grube e87791
manage_dirs_pattern(puppet_t, puppet_tmp_t, puppet_tmp_t)
Craig Grube e87791
manage_files_pattern(puppet_t, puppet_tmp_t, puppet_tmp_t)
Craig Grube e87791
files_tmp_filetrans(puppet_t, puppet_tmp_t, { file dir })
Craig Grube e87791
Chris PeBenito e6d8fd
kernel_dontaudit_search_sysctl(puppet_t)
Chris PeBenito e6d8fd
kernel_dontaudit_search_kernel_sysctl(puppet_t)
Chris PeBenito e6d8fd
kernel_read_system_state(puppet_t)
Chris PeBenito e6d8fd
kernel_read_crypto_sysctls(puppet_t)
Chris PeBenito e6d8fd
Chris PeBenito e6d8fd
corecmd_exec_bin(puppet_t)
Chris PeBenito e6d8fd
corecmd_exec_shell(puppet_t)
Craig Grube e87791
Craig Grube e87791
corenet_all_recvfrom_netlabel(puppet_t)
Craig Grube e87791
corenet_all_recvfrom_unlabeled(puppet_t)
Craig Grube e87791
corenet_tcp_sendrecv_generic_if(puppet_t)
Craig Grube e87791
corenet_tcp_sendrecv_generic_node(puppet_t)
Craig Grube e87791
corenet_tcp_bind_generic_node(puppet_t)
Chris PeBenito e6d8fd
corenet_tcp_connect_puppet_port(puppet_t)
Chris PeBenito e6d8fd
corenet_sendrecv_puppet_client_packets(puppet_t)
Craig Grube e87791
Craig Grube e87791
dev_read_rand(puppet_t)
Craig Grube e87791
dev_read_sysfs(puppet_t)
Craig Grube e87791
dev_read_urand(puppet_t)
Craig Grube e87791
Craig Grube e87791
domain_read_all_domains_state(puppet_t)
Craig Grube e87791
domain_interactive_fd(puppet_t)
Craig Grube e87791
Craig Grube e87791
files_manage_config_files(puppet_t)
Craig Grube e87791
files_manage_config_dirs(puppet_t)
Craig Grube e87791
files_manage_etc_dirs(puppet_t)
Craig Grube e87791
files_manage_etc_files(puppet_t)
Craig Grube e87791
files_read_usr_symlinks(puppet_t)
Craig Grube e87791
files_relabel_config_dirs(puppet_t)
Craig Grube e87791
files_relabel_config_files(puppet_t)
Chris PeBenito e6d8fd
Chris PeBenito e6d8fd
selinux_search_fs(puppet_t)
Chris PeBenito e6d8fd
selinux_set_all_booleans(puppet_t)
Chris PeBenito e6d8fd
selinux_set_generic_booleans(puppet_t)
Chris PeBenito e6d8fd
selinux_validate_context(puppet_t)
Chris PeBenito e6d8fd
Chris PeBenito e6d8fd
term_dontaudit_getattr_unallocated_ttys(puppet_t)
Chris PeBenito c3c753
term_dontaudit_getattr_all_ttys(puppet_t)
Craig Grube e87791
Craig Grube e87791
init_all_labeled_script_domtrans(puppet_t)
Craig Grube e87791
init_domtrans_script(puppet_t)
Craig Grube e87791
init_read_utmp(puppet_t)
Craig Grube e87791
init_signull_script(puppet_t)
Craig Grube e87791
Craig Grube e87791
logging_send_syslog_msg(puppet_t)
Craig Grube e87791
Craig Grube e87791
miscfiles_read_hwdata(puppet_t)
Craig Grube e87791
miscfiles_read_localization(puppet_t)
Craig Grube e87791
Craig Grube e87791
seutil_domtrans_setfiles(puppet_t)
Craig Grube e87791
seutil_domtrans_semanage(puppet_t)
Craig Grube e87791
Craig Grube e87791
sysnet_dns_name_resolve(puppet_t)
Craig Grube e87791
sysnet_run_ifconfig(puppet_t, system_r)
Craig Grube e87791
Craig Grube e87791
tunable_policy(`puppet_manage_all_files',`
Craig Grube e87791
	auth_manage_all_files_except_shadow(puppet_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	consoletype_domtrans(puppet_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	hostname_exec(puppet_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	files_rw_var_files(puppet_t)
Craig Grube e87791
Craig Grube e87791
	rpm_domtrans(puppet_t)
Craig Grube e87791
	rpm_manage_db(puppet_t)
Craig Grube e87791
	rpm_manage_log(puppet_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	unconfined_domain(puppet_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	usermanage_domtrans_groupadd(puppet_t)
Craig Grube e87791
	usermanage_domtrans_useradd(puppet_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
########################################
Craig Grube e87791
#
Craig Grube e87791
# Pupper master personal policy
Craig Grube e87791
#
Craig Grube e87791
Craig Grube e87791
allow puppetmaster_t self:capability { dac_read_search dac_override setuid setgid fowner chown fsetid sys_tty_config };
Craig Grube e87791
allow puppetmaster_t self:process { signal_perms getsched setsched };
Chris PeBenito e6d8fd
allow puppetmaster_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito e6d8fd
allow puppetmaster_t self:netlink_route_socket create_netlink_socket_perms;
Craig Grube e87791
allow puppetmaster_t self:socket create;
Craig Grube e87791
allow puppetmaster_t self:tcp_socket create_stream_socket_perms;
Craig Grube e87791
allow puppetmaster_t self:udp_socket create_socket_perms;
Craig Grube e87791
Craig Grube e87791
list_dirs_pattern(puppetmaster_t, puppet_etc_t, puppet_etc_t)
Craig Grube e87791
read_files_pattern(puppetmaster_t, puppet_etc_t, puppet_etc_t)
Craig Grube e87791
Chris PeBenito e6d8fd
allow puppetmaster_t puppet_log_t:dir { rw_dir_perms setattr };
Chris PeBenito e6d8fd
allow puppetmaster_t puppet_log_t:file { rw_file_perms create setattr };
Chris PeBenito e6d8fd
logging_log_filetrans(puppetmaster_t, puppet_log_t, { file dir })
Chris PeBenito e6d8fd
Chris PeBenito e6d8fd
manage_dirs_pattern(puppetmaster_t, puppet_var_lib_t, puppet_var_lib_t)
Craig Grube e87791
manage_files_pattern(puppetmaster_t, puppet_var_lib_t, puppet_var_lib_t)
Craig Grube e87791
Craig Grube e87791
setattr_dirs_pattern(puppetmaster_t, puppet_var_run_t, puppet_var_run_t)
Craig Grube e87791
manage_files_pattern(puppetmaster_t, puppet_var_run_t, puppet_var_run_t)
Craig Grube e87791
files_pid_filetrans(puppetmaster_t, puppet_var_run_t, { file dir })
Craig Grube e87791
Craig Grube e87791
manage_dirs_pattern(puppetmaster_t, puppetmaster_tmp_t, puppetmaster_tmp_t)
Craig Grube e87791
manage_files_pattern(puppetmaster_t, puppetmaster_tmp_t, puppetmaster_tmp_t)
Craig Grube e87791
files_tmp_filetrans(puppetmaster_t, puppetmaster_tmp_t, { file dir })
Craig Grube e87791
Chris PeBenito e6d8fd
kernel_dontaudit_search_kernel_sysctl(puppetmaster_t)
Chris PeBenito e6d8fd
kernel_read_system_state(puppetmaster_t)
Chris PeBenito e6d8fd
kernel_read_crypto_sysctls(puppetmaster_t)
Chris PeBenito e6d8fd
Chris PeBenito e6d8fd
corecmd_exec_bin(puppetmaster_t)
Chris PeBenito e6d8fd
corecmd_exec_shell(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
corenet_all_recvfrom_netlabel(puppetmaster_t)
Craig Grube e87791
corenet_all_recvfrom_unlabeled(puppetmaster_t)
Craig Grube e87791
corenet_tcp_sendrecv_generic_if(puppetmaster_t)
Craig Grube e87791
corenet_tcp_sendrecv_generic_node(puppetmaster_t)
Craig Grube e87791
corenet_tcp_bind_generic_node(puppetmaster_t)
Chris PeBenito e6d8fd
corenet_tcp_bind_puppet_port(puppetmaster_t)
Chris PeBenito e6d8fd
corenet_sendrecv_puppet_server_packets(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
dev_read_rand(puppetmaster_t)
Craig Grube e87791
dev_read_urand(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
domain_read_all_domains_state(puppetmaster_t)
Craig Grube e87791
Chris PeBenito e6d8fd
files_read_etc_files(puppetmaster_t)
Chris PeBenito e6d8fd
files_search_var_lib(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
logging_send_syslog_msg(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
miscfiles_read_localization(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
sysnet_dns_name_resolve(puppetmaster_t)
Craig Grube e87791
sysnet_run_ifconfig(puppetmaster_t, system_r)
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	hostname_exec(puppetmaster_t)
Craig Grube e87791
')
Craig Grube e87791
Craig Grube e87791
optional_policy(`
Craig Grube e87791
	files_read_usr_symlinks(puppetmaster_t)
Craig Grube e87791
Craig Grube e87791
	rpm_exec(puppetmaster_t)
Craig Grube e87791
	rpm_read_db(puppetmaster_t)
Craig Grube e87791
')