selinux-refpolicy/policy/modules/services/cobbler.te

129 lines
3.3 KiB
Plaintext
Raw Normal View History

2010-05-24 19:32:01 +00:00
policy_module(cobbler, 1.1.0)
########################################
#
# Cobbler personal declarations.
#
## <desc>
## <p>
## Allow Cobbler to modify public files
## used for public file transfer services.
## </p>
## </desc>
gen_tunable(cobbler_anon_write, false)
type cobblerd_t;
type cobblerd_exec_t;
init_daemon_domain(cobblerd_t, cobblerd_exec_t)
type cobblerd_initrc_exec_t;
init_script_file(cobblerd_initrc_exec_t)
type cobbler_etc_t;
files_config_file(cobbler_etc_t)
type cobbler_var_log_t;
logging_log_file(cobbler_var_log_t)
type cobbler_var_lib_t;
files_type(cobbler_var_lib_t)
########################################
#
# Cobbler personal policy.
#
allow cobblerd_t self:capability { chown dac_override fowner sys_nice };
allow cobblerd_t self:process { getsched setsched signal };
allow cobblerd_t self:fifo_file rw_fifo_file_perms;
allow cobblerd_t self:tcp_socket create_stream_socket_perms;
2010-05-07 14:09:07 +00:00
list_dirs_pattern(cobblerd_t, cobbler_etc_t, cobbler_etc_t)
read_files_pattern(cobblerd_t, cobbler_etc_t, cobbler_etc_t)
manage_dirs_pattern(cobblerd_t, cobbler_var_lib_t, cobbler_var_lib_t)
manage_files_pattern(cobblerd_t, cobbler_var_lib_t, cobbler_var_lib_t)
files_var_lib_filetrans(cobblerd_t, cobbler_var_lib_t, { dir file })
append_files_pattern(cobblerd_t, cobbler_var_log_t, cobbler_var_log_t)
create_files_pattern(cobblerd_t, cobbler_var_log_t, cobbler_var_log_t)
read_files_pattern(cobblerd_t, cobbler_var_log_t, cobbler_var_log_t)
setattr_files_pattern(cobblerd_t, cobbler_var_log_t, cobbler_var_log_t)
logging_log_filetrans(cobblerd_t, cobbler_var_log_t, file)
2010-02-08 18:38:48 +00:00
kernel_read_system_state(cobblerd_t)
corecmd_exec_bin(cobblerd_t)
corecmd_exec_shell(cobblerd_t)
corenet_all_recvfrom_netlabel(cobblerd_t)
corenet_all_recvfrom_unlabeled(cobblerd_t)
corenet_sendrecv_cobbler_server_packets(cobblerd_t)
corenet_tcp_bind_cobbler_port(cobblerd_t)
corenet_tcp_bind_generic_node(cobblerd_t)
corenet_tcp_sendrecv_generic_if(cobblerd_t)
corenet_tcp_sendrecv_generic_node(cobblerd_t)
corenet_tcp_sendrecv_generic_port(cobblerd_t)
dev_read_urand(cobblerd_t)
files_read_usr_files(cobblerd_t)
files_list_boot(cobblerd_t)
files_list_tmp(cobblerd_t)
# read /etc/nsswitch.conf
files_read_etc_files(cobblerd_t)
miscfiles_read_localization(cobblerd_t)
miscfiles_read_public_files(cobblerd_t)
sysnet_read_config(cobblerd_t)
sysnet_rw_dhcp_config(cobblerd_t)
sysnet_write_config(cobblerd_t)
tunable_policy(`cobbler_anon_write',`
miscfiles_manage_public_files(cobblerd_t)
')
optional_policy(`
bind_read_config(cobblerd_t)
bind_write_config(cobblerd_t)
bind_domtrans_ndc(cobblerd_t)
bind_domtrans(cobblerd_t)
bind_initrc_domtrans(cobblerd_t)
bind_manage_zone(cobblerd_t)
')
optional_policy(`
dhcpd_domtrans(cobblerd_t)
dhcpd_initrc_domtrans(cobblerd_t)
')
optional_policy(`
dnsmasq_domtrans(cobblerd_t)
dnsmasq_initrc_domtrans(cobblerd_t)
dnsmasq_write_config(cobblerd_t)
')
optional_policy(`
rpm_exec(cobblerd_t)
')
optional_policy(`
rsync_read_config(cobblerd_t)
rsync_write_config(cobblerd_t)
')
optional_policy(`
2010-02-08 18:38:48 +00:00
tftp_manage_rw_content(cobblerd_t)
')
2010-05-07 14:09:07 +00:00
########################################
#
# Cobbler web local policy.
#
apache_content_template(cobbler)
2010-05-11 12:23:02 +00:00
manage_dirs_pattern(cobblerd_t, httpd_cobbler_content_rw_t, httpd_cobbler_content_rw_t)
manage_files_pattern(cobblerd_t, httpd_cobbler_content_rw_t, httpd_cobbler_content_rw_t)