Chris PeBenito 73fbc7
Chris PeBenito 5ea24b
policy_module(nis,1.1.0)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
########################################
Chris PeBenito 73fbc7
#
Chris PeBenito 73fbc7
# Declarations
Chris PeBenito 73fbc7
#
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type var_yp_t;
Chris PeBenito 8fd367
files_type(var_yp_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type ypbind_t;
Chris PeBenito 73fbc7
type ypbind_exec_t;
Chris PeBenito 73fbc7
init_daemon_domain(ypbind_t,ypbind_exec_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type ypbind_tmp_t;
Chris PeBenito 73fbc7
files_tmp_file(ypbind_tmp_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type ypbind_var_run_t;
Chris PeBenito 73fbc7
files_pid_file(ypbind_var_run_t)
Chris PeBenito 73fbc7
Chris PeBenito 131e57
type yppasswdd_t;
Chris PeBenito 131e57
type yppasswdd_exec_t;
Chris PeBenito 131e57
init_daemon_domain(yppasswdd_t,yppasswdd_exec_t)
Chris PeBenito 1815ba
domain_obj_id_change_exemption(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
type yppasswdd_var_run_t;
Chris PeBenito 131e57
files_pid_file(yppasswdd_var_run_t)
Chris PeBenito 131e57
Chris PeBenito 73fbc7
type ypserv_t;
Chris PeBenito 73fbc7
type ypserv_exec_t;
Chris PeBenito 73fbc7
init_daemon_domain(ypserv_t,ypserv_exec_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type ypserv_conf_t;
Chris PeBenito 8fd367
files_type(ypserv_conf_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type ypserv_tmp_t;
Chris PeBenito 73fbc7
files_tmp_file(ypserv_tmp_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
type ypserv_var_run_t;
Chris PeBenito 73fbc7
files_pid_file(ypserv_var_run_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
########################################
Chris PeBenito 73fbc7
#
Chris PeBenito 73fbc7
# ypbind local policy
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
dontaudit ypbind_t self:capability { net_admin sys_tty_config };
Chris PeBenito 73fbc7
allow ypbind_t self:fifo_file rw_file_perms;
Chris PeBenito 3f4188
allow ypbind_t self:process signal_perms;
Chris PeBenito 73fbc7
allow ypbind_t self:{ unix_dgram_socket unix_stream_socket } create_socket_perms;
Chris PeBenito 73fbc7
allow ypbind_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 3f4188
allow ypbind_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 3f4188
allow ypbind_t self:udp_socket create_socket_perms;
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
allow ypbind_t ypbind_tmp_t:dir create_dir_perms;
Chris PeBenito 73fbc7
allow ypbind_t ypbind_tmp_t:file create_file_perms;
Chris PeBenito 9d5949
files_filetrans_tmp(ypbind_t, ypbind_tmp_t, { file dir })
Chris PeBenito 73fbc7
Chris PeBenito 5abea9
allow ypbind_t ypbind_var_run_t:file manage_file_perms;
Chris PeBenito fc6198
allow ypbind_t ypbind_var_run_t:dir rw_dir_perms;
Chris PeBenito 9d5949
files_filetrans_pid(ypbind_t,ypbind_var_run_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
allow ypbind_t var_yp_t:dir rw_dir_perms;
Chris PeBenito 73fbc7
allow ypbind_t var_yp_t:file create_file_perms;
Chris PeBenito 73fbc7
Chris PeBenito 445522
kernel_read_kernel_sysctls(ypbind_t)
Chris PeBenito b24f35
kernel_list_proc(ypbind_t)
Chris PeBenito b24f35
kernel_read_proc_symlinks(ypbind_t)
Chris PeBenito ad3b9d
kernel_tcp_recvfrom(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
corenet_tcp_sendrecv_all_if(ypbind_t)
Chris PeBenito 73fbc7
corenet_udp_sendrecv_all_if(ypbind_t)
Chris PeBenito 73fbc7
corenet_raw_sendrecv_all_if(ypbind_t)
Chris PeBenito 73fbc7
corenet_tcp_sendrecv_all_nodes(ypbind_t)
Chris PeBenito 73fbc7
corenet_udp_sendrecv_all_nodes(ypbind_t)
Chris PeBenito 73fbc7
corenet_raw_sendrecv_all_nodes(ypbind_t)
Chris PeBenito 73fbc7
corenet_tcp_sendrecv_all_ports(ypbind_t)
Chris PeBenito 73fbc7
corenet_udp_sendrecv_all_ports(ypbind_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(ypbind_t)
Chris PeBenito bd7037
corenet_tcp_bind_all_nodes(ypbind_t)
Chris PeBenito bd7037
corenet_udp_bind_all_nodes(ypbind_t)
Chris PeBenito 73fbc7
corenet_tcp_bind_generic_port(ypbind_t)
Chris PeBenito 73fbc7
corenet_udp_bind_generic_port(ypbind_t)
Chris PeBenito 73fbc7
corenet_tcp_bind_reserved_port(ypbind_t)
Chris PeBenito 73fbc7
corenet_udp_bind_reserved_port(ypbind_t)
Chris PeBenito 2705f9
corenet_tcp_connect_all_ports(ypbind_t)
Chris PeBenito 73fbc7
corenet_dontaudit_tcp_bind_all_reserved_ports(ypbind_t)
Chris PeBenito 73fbc7
corenet_dontaudit_udp_bind_all_reserved_ports(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
dev_read_sysfs(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
fs_getattr_all_fs(ypbind_t)
Chris PeBenito ab940a
fs_search_auto_mountpoints(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
term_dontaudit_use_console(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
domain_use_wide_inherit_fd(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 8fd367
files_read_etc_files(ypbind_t)
Chris PeBenito 5abea9
files_list_var(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
init_use_fd(ypbind_t)
Chris PeBenito 1815ba
init_use_script_ptys(ypbind_t)
Chris PeBenito 1815ba
init_udp_send_script(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
libs_use_ld_so(ypbind_t)
Chris PeBenito 73fbc7
libs_use_shared_libs(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
logging_send_syslog_msg(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
miscfiles_read_localization(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
sysnet_read_config(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
userdom_dontaudit_use_unpriv_user_fd(ypbind_t)
Chris PeBenito b24f35
userdom_dontaudit_search_sysadm_home_dir(ypbind_t)
Chris PeBenito 73fbc7
Chris PeBenito 1815ba
portmap_udp_send(ypbind_t)
Chris PeBenito 131e57
Chris PeBenito 73fbc7
ifdef(`targeted_policy', `
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(ypbind_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(ypbind_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(ypbind_t)
Chris PeBenito 73fbc7
')
Chris PeBenito 73fbc7
Chris PeBenito 132880
optional_policy(`mount',`
Chris PeBenito 73fbc7
	mount_send_nfs_client_request(ypbind_t)
Chris PeBenito 73fbc7
')
Chris PeBenito 73fbc7
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito 8fd367
	seutil_sigchld_newrole(ypbind_t)
Chris PeBenito 73fbc7
')
Chris PeBenito 73fbc7
Chris PeBenito 132880
optional_policy(`udev',`
Chris PeBenito 73fbc7
	udev_read_db(ypbind_t)
Chris PeBenito 73fbc7
')
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
########################################
Chris PeBenito 73fbc7
#
Chris PeBenito 131e57
# yppasswdd local policy
Chris PeBenito 131e57
#
Chris PeBenito 131e57
Chris PeBenito 131e57
dontaudit yppasswdd_t self:capability sys_tty_config;
Chris PeBenito 131e57
allow yppasswdd_t self:fifo_file rw_file_perms;
Chris PeBenito 131e57
allow yppasswdd_t self:process { setfscreate signal_perms };
Chris PeBenito 131e57
allow yppasswdd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 131e57
allow yppasswdd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 131e57
allow yppasswdd_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 131e57
allow yppasswdd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 131e57
allow yppasswdd_t self:udp_socket create_socket_perms;
Chris PeBenito 131e57
Chris PeBenito 131e57
allow yppasswdd_t yppasswdd_var_run_t:file create_file_perms;
Chris PeBenito 131e57
allow yppasswdd_t yppasswdd_var_run_t:dir rw_dir_perms;
Chris PeBenito 9d5949
files_filetrans_pid(yppasswdd_t,yppasswdd_var_run_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
allow yppasswdd_t var_yp_t:dir rw_dir_perms;
Chris PeBenito 131e57
allow yppasswdd_t var_yp_t:file create_file_perms;
Chris PeBenito 131e57
allow yppasswdd_t var_yp_t:lnk_file create_lnk_perms;
Chris PeBenito 131e57
Chris PeBenito 131e57
kernel_list_proc(yppasswdd_t)
Chris PeBenito 131e57
kernel_read_proc_symlinks(yppasswdd_t)
Chris PeBenito 131e57
kernel_getattr_proc_files(yppasswdd_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
corenet_tcp_sendrecv_generic_if(yppasswdd_t)
Chris PeBenito 131e57
corenet_udp_sendrecv_generic_if(yppasswdd_t)
Chris PeBenito 131e57
corenet_raw_sendrecv_generic_if(yppasswdd_t)
Chris PeBenito 131e57
corenet_tcp_sendrecv_all_nodes(yppasswdd_t)
Chris PeBenito 131e57
corenet_udp_sendrecv_all_nodes(yppasswdd_t)
Chris PeBenito 131e57
corenet_raw_sendrecv_all_nodes(yppasswdd_t)
Chris PeBenito 131e57
corenet_tcp_sendrecv_all_ports(yppasswdd_t)
Chris PeBenito 131e57
corenet_udp_sendrecv_all_ports(yppasswdd_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(yppasswdd_t)
Chris PeBenito 131e57
corenet_tcp_bind_all_nodes(yppasswdd_t)
Chris PeBenito 131e57
corenet_udp_bind_all_nodes(yppasswdd_t)
Chris PeBenito 131e57
corenet_tcp_bind_reserved_port(yppasswdd_t)
Chris PeBenito 131e57
corenet_udp_bind_reserved_port(yppasswdd_t)
Chris PeBenito 131e57
corenet_dontaudit_tcp_bind_all_reserved_ports(yppasswdd_t)
Chris PeBenito 131e57
corenet_dontaudit_udp_bind_all_reserved_ports(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
dev_read_sysfs(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
fs_getattr_all_fs(yppasswdd_t)
Chris PeBenito 131e57
fs_search_auto_mountpoints(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
selinux_get_fs_mount(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
term_dontaudit_use_console(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
auth_manage_shadow(yppasswdd_t)
Chris PeBenito 131e57
auth_relabel_shadow(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
corecmd_exec_bin(yppasswdd_t)
Chris PeBenito 131e57
corecmd_exec_shell(yppasswdd_t)
Chris PeBenito 131e57
corecmd_search_sbin(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
domain_use_wide_inherit_fd(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
files_read_etc_files(yppasswdd_t)
Chris PeBenito 131e57
files_read_etc_runtime_files(yppasswdd_t)
Chris PeBenito 131e57
files_relabel_etc_files(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
init_use_fd(yppasswdd_t)
Chris PeBenito 1815ba
init_use_script_ptys(yppasswdd_t)
Chris PeBenito 1815ba
init_udp_send_script(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
libs_use_ld_so(yppasswdd_t)
Chris PeBenito 131e57
libs_use_shared_libs(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
logging_send_syslog_msg(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
miscfiles_read_localization(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
sysnet_read_config(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
userdom_dontaudit_use_unpriv_user_fd(yppasswdd_t)
Chris PeBenito 131e57
userdom_dontaudit_search_sysadm_home_dir(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 1815ba
portmap_udp_send(yppasswdd_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
        term_dontaudit_use_unallocated_ttys(yppasswdd_t)
Chris PeBenito 1815ba
        term_dontaudit_use_generic_ptys(yppasswdd_t)
Chris PeBenito 9e04f5
        files_dontaudit_read_root_files(yppasswdd_t)
Chris PeBenito 131e57
')
Chris PeBenito 131e57
Chris PeBenito 131e57
optional_policy(`hostname',`
Chris PeBenito 131e57
	hostname_exec(yppasswdd_t)
Chris PeBenito 131e57
')
Chris PeBenito 131e57
Chris PeBenito 131e57
optional_policy(`selinuxutil',`
Chris PeBenito 131e57
        seutil_sigchld_newrole(yppasswdd_t)
Chris PeBenito 131e57
')
Chris PeBenito 131e57
Chris PeBenito 131e57
optional_policy(`udev',`
Chris PeBenito 131e57
        udev_read_db(yppasswdd_t)
Chris PeBenito 131e57
')
Chris PeBenito 131e57
Chris PeBenito 131e57
########################################
Chris PeBenito 131e57
#
Chris PeBenito 73fbc7
# ypserv local policy
Chris PeBenito 73fbc7
#
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
dontaudit ypserv_t self:capability sys_tty_config;
Chris PeBenito 73fbc7
allow ypserv_t self:fifo_file rw_file_perms;
Chris PeBenito 3f4188
allow ypserv_t self:process signal_perms;
Chris PeBenito 73fbc7
allow ypserv_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 73fbc7
allow ypserv_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 3f4188
allow ypserv_t self:tcp_socket connected_stream_socket_perms;
Chris PeBenito 3f4188
allow ypserv_t self:udp_socket create_socket_perms;
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
allow ypserv_t var_yp_t:dir rw_dir_perms;
Chris PeBenito 73fbc7
allow ypserv_t var_yp_t:file create_file_perms;
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
allow ypserv_t ypserv_conf_t:file { getattr read };
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
allow ypserv_t ypserv_tmp_t:dir create_dir_perms;
Chris PeBenito 73fbc7
allow ypserv_t ypserv_tmp_t:file create_file_perms;
Chris PeBenito 9d5949
files_filetrans_tmp(ypserv_t, ypserv_tmp_t, { file dir })
Chris PeBenito 73fbc7
Chris PeBenito 5abea9
allow ypserv_t ypserv_var_run_t:dir rw_dir_perms;
Chris PeBenito 5abea9
allow ypserv_t ypserv_var_run_t:file manage_file_perms;
Chris PeBenito 9d5949
files_filetrans_pid(ypserv_t,ypserv_var_run_t)
Chris PeBenito 73fbc7
Chris PeBenito 445522
kernel_read_kernel_sysctls(ypserv_t)
Chris PeBenito b24f35
kernel_list_proc(ypserv_t)
Chris PeBenito b24f35
kernel_read_proc_symlinks(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
corenet_tcp_sendrecv_all_if(ypserv_t)
Chris PeBenito 694248
corenet_udp_sendrecv_all_if(ypserv_t)
Chris PeBenito 73fbc7
corenet_raw_sendrecv_all_if(ypserv_t)
Chris PeBenito 73fbc7
corenet_tcp_sendrecv_all_nodes(ypserv_t)
Chris PeBenito 694248
corenet_udp_sendrecv_all_nodes(ypserv_t)
Chris PeBenito 73fbc7
corenet_raw_sendrecv_all_nodes(ypserv_t)
Chris PeBenito 73fbc7
corenet_tcp_sendrecv_all_ports(ypserv_t)
Chris PeBenito 694248
corenet_udp_sendrecv_all_ports(ypserv_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(ypserv_t)
Chris PeBenito 73fbc7
corenet_tcp_bind_all_nodes(ypserv_t)
Chris PeBenito 694248
corenet_udp_bind_all_nodes(ypserv_t)
Chris PeBenito 73fbc7
corenet_tcp_bind_reserved_port(ypserv_t)
Chris PeBenito 73fbc7
corenet_udp_bind_reserved_port(ypserv_t)
Chris PeBenito 73fbc7
corenet_dontaudit_tcp_bind_all_reserved_ports(ypserv_t)
Chris PeBenito 73fbc7
corenet_dontaudit_udp_bind_all_reserved_ports(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
dev_read_sysfs(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
fs_getattr_all_fs(ypserv_t)
Chris PeBenito ab940a
fs_search_auto_mountpoints(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
term_dontaudit_use_console(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 77f6e2
corecmd_exec_bin(ypserv_t)
Chris PeBenito 77f6e2
Chris PeBenito 73fbc7
domain_use_wide_inherit_fd(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 5abea9
files_read_var_files(ypserv_t)
Chris PeBenito 5abea9
Chris PeBenito 73fbc7
init_use_fd(ypserv_t)
Chris PeBenito 1815ba
init_use_script_ptys(ypserv_t)
Chris PeBenito 1815ba
init_udp_send_script(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
libs_use_ld_so(ypserv_t)
Chris PeBenito 73fbc7
libs_use_shared_libs(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
logging_send_syslog_msg(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
miscfiles_read_localization(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
sysnet_read_config(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 73fbc7
userdom_dontaudit_use_unpriv_user_fd(ypserv_t)
Chris PeBenito b24f35
userdom_dontaudit_search_sysadm_home_dir(ypserv_t)
Chris PeBenito 73fbc7
Chris PeBenito 1815ba
portmap_udp_send(ypserv_t)
Chris PeBenito 131e57
Chris PeBenito 131e57
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(ypserv_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(ypserv_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(ypserv_t)
Chris PeBenito 73fbc7
')
Chris PeBenito 73fbc7
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito 8fd367
	seutil_sigchld_newrole(ypserv_t)
Chris PeBenito 73fbc7
')
Chris PeBenito 73fbc7
Chris PeBenito 131e57
optional_policy(`udev',`
Chris PeBenito 73fbc7
	udev_read_db(ypserv_t)
Chris PeBenito 73fbc7
')