Chris PeBenito 17de1b
Chris PeBenito c12621
policy_module(nsd, 1.6.1)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nsd_t;
Chris PeBenito 17de1b
type nsd_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(nsd_t, nsd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# A type for configuration files of nsd
Chris PeBenito 17de1b
type nsd_conf_t;
Chris PeBenito 17de1b
files_type(nsd_conf_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nsd_crond_t;
Chris PeBenito 17de1b
domain_type(nsd_crond_t)
Chris PeBenito 0bfccd
domain_entry_file(nsd_crond_t, nsd_exec_t)
Chris PeBenito 17de1b
role system_r types nsd_crond_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# a type for nsd.db
Chris PeBenito 17de1b
type nsd_db_t;
Chris PeBenito 17de1b
files_type(nsd_db_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nsd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(nsd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# A type for zone files
Chris PeBenito 17de1b
type nsd_zone_t;
Chris PeBenito 17de1b
files_type(nsd_zone_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# NSD Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nsd_t self:capability { dac_override chown setuid setgid };
Chris PeBenito 17de1b
dontaudit nsd_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow nsd_t self:process signal_perms;
Chris PeBenito 17de1b
allow nsd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow nsd_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow nsd_t nsd_conf_t:dir list_dir_perms;
Chris PeBenito 0bfccd
read_files_pattern(nsd_t, nsd_conf_t, nsd_conf_t)
Chris PeBenito 0bfccd
read_lnk_files_pattern(nsd_t, nsd_conf_t, nsd_conf_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nsd_t nsd_db_t:file manage_file_perms;
Chris PeBenito 0bfccd
filetrans_pattern(nsd_t, nsd_zone_t, nsd_db_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(nsd_t, nsd_var_run_t, nsd_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(nsd_t, nsd_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow nsd_t nsd_zone_t:dir list_dir_perms;
Chris PeBenito 0bfccd
read_files_pattern(nsd_t, nsd_zone_t, nsd_zone_t)
Chris PeBenito 0bfccd
read_lnk_files_pattern(nsd_t, nsd_zone_t, nsd_zone_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
can_exec(nsd_t, nsd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(nsd_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(nsd_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(nsd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(nsd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(nsd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(nsd_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(nsd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(nsd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(nsd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(nsd_t)
Chris PeBenito c12621
corenet_udp_bind_generic_node(nsd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_dns_port(nsd_t)
Chris PeBenito 17de1b
corenet_udp_bind_dns_port(nsd_t)
Chris PeBenito 17de1b
corenet_sendrecv_dns_server_packets(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(nsd_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(nsd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(nsd_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(nsd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(nsd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(nsd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Zone update cron job local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# kill capability for root cron job and non-root daemon
Chris PeBenito 17de1b
allow nsd_crond_t self:capability { dac_override kill };
Chris PeBenito 17de1b
dontaudit nsd_crond_t self:capability sys_nice;
Chris PeBenito 17de1b
allow nsd_crond_t self:process { setsched signal_perms };
Chris PeBenito c0868a
allow nsd_crond_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow nsd_crond_t self:tcp_socket create_socket_perms;
Chris PeBenito 17de1b
allow nsd_crond_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 0b36a2
allow nsd_crond_t nsd_conf_t:file read_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nsd_crond_t nsd_db_t:file manage_file_perms;
Chris PeBenito 0bfccd
filetrans_pattern(nsd_crond_t, nsd_zone_t, nsd_db_t, file)
Chris PeBenito 17de1b
files_search_var_lib(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nsd_crond_t nsd_t:process signal;
Chris PeBenito c0868a
Chris PeBenito 0bfccd
ps_process_pattern(nsd_crond_t, nsd_t)
Chris PeBenito c0868a
Chris PeBenito 0bfccd
manage_files_pattern(nsd_crond_t, nsd_zone_t, nsd_zone_t)
Chris PeBenito 0bfccd
filetrans_pattern(nsd_crond_t, nsd_conf_t, nsd_zone_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
can_exec(nsd_crond_t, nsd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_bin(nsd_crond_t)
Chris PeBenito 17de1b
corecmd_exec_shell(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(nsd_crond_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(nsd_crond_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(nsd_crond_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(nsd_crond_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(nsd_crond_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(nsd_crond_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(nsd_crond_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(nsd_crond_t)
Chris PeBenito 17de1b
corenet_tcp_connect_all_ports(nsd_crond_t)
Chris PeBenito 17de1b
corenet_sendrecv_all_client_packets(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# for SSP
Chris PeBenito 17de1b
dev_read_urand(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_dontaudit_read_all_domains_state(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(nsd_crond_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(nsd_crond_t)
Chris PeBenito 17de1b
files_search_var_lib(nsd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(nsd_crond_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 0bfccd
	cron_system_entry(nsd_crond_t, nsd_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(nsd_crond_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nscd_read_pid(nsd_crond_t)
Chris PeBenito 17de1b
')