Chris PeBenito 17de1b
Chris PeBenito 7a5e2d
policy_module(tftp,1.6.1)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 226c06
## <desc>
Chris PeBenito 226c06
## 

Chris PeBenito 226c06
## Allow tftp to modify public files
Chris PeBenito 226c06
## used for public file transfer services.
Chris PeBenito 226c06
## 

Chris PeBenito 226c06
## </desc>
Chris PeBenito 226c06
gen_tunable(tftp_anon_write,false)
Chris PeBenito 226c06
Chris PeBenito 17de1b
type tftpd_t;
Chris PeBenito 17de1b
type tftpd_exec_t;
Chris PeBenito 17de1b
init_daemon_domain(tftpd_t,tftpd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type tftpd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(tftpd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type tftpdir_t;
Chris PeBenito 17de1b
files_type(tftpdir_t)
Chris PeBenito 17de1b
Chris PeBenito 226c06
type tftpdir_rw_t;
Chris PeBenito 226c06
files_type(tftpdir_rw_t)
Chris PeBenito 226c06
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow tftpd_t self:capability { setgid setuid sys_chroot };
Chris PeBenito 17de1b
allow tftpd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow tftpd_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
allow tftpd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow tftpd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito cdf98f
allow tftpd_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 17de1b
dontaudit tftpd_t self:capability sys_tty_config;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow tftpd_t tftpdir_t:dir { getattr read search };
Chris PeBenito 17de1b
allow tftpd_t tftpdir_t:file { read getattr };
Chris PeBenito 17de1b
allow tftpd_t tftpdir_t:lnk_file { getattr read };
Chris PeBenito 17de1b
Chris PeBenito 226c06
manage_dirs_pattern(tftpd_t, tftpdir_rw_t, tftpdir_rw_t)
Chris PeBenito 226c06
manage_files_pattern(tftpd_t, tftpdir_rw_t, tftpdir_rw_t)
Chris PeBenito 226c06
manage_lnk_files_pattern(tftpd_t, tftpdir_rw_t, tftpdir_rw_t)
Chris PeBenito 226c06
Chris PeBenito c0868a
manage_files_pattern(tftpd_t,tftpd_var_run_t,tftpd_var_run_t)
Chris PeBenito 17de1b
files_pid_filetrans(tftpd_t,tftpd_var_run_t,file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(tftpd_t)
Chris PeBenito 17de1b
kernel_list_proc(tftpd_t)
Chris PeBenito 17de1b
kernel_read_proc_symlinks(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(tftpd_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(tftpd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_if(tftpd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_if(tftpd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_nodes(tftpd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_nodes(tftpd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(tftpd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(tftpd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_all_nodes(tftpd_t)
Chris PeBenito 17de1b
corenet_udp_bind_all_nodes(tftpd_t)
Chris PeBenito 17de1b
corenet_udp_bind_tftp_port(tftpd_t)
Chris PeBenito 17de1b
corenet_sendrecv_tftp_server_packets(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(tftpd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(tftpd_t);
Chris PeBenito 17de1b
files_read_var_files(tftpd_t)
Chris PeBenito 17de1b
files_read_var_symlinks(tftpd_t)
Chris PeBenito 17de1b
files_search_var(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(tftpd_t)
Chris PeBenito 17de1b
libs_use_shared_libs(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(tftpd_t)
Chris PeBenito f6a590
miscfiles_read_public_files(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(tftpd_t)
Chris PeBenito 465510
sysnet_use_ldap(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(tftpd_t)
Chris PeBenito 17de1b
userdom_dontaudit_use_sysadm_ttys(tftpd_t)
Chris PeBenito 17de1b
userdom_dontaudit_search_sysadm_home_dirs(tftpd_t)
Chris PeBenito 17de1b
Chris PeBenito 226c06
tunable_policy(`tftp_anon_write',`
Chris PeBenito 226c06
	miscfiles_manage_public_files(tftpd_t)
Chris PeBenito 226c06
') 
Chris PeBenito 226c06
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito d4a48c
	inetd_udp_service_domain(tftpd_t,tftpd_exec_t)
Chris PeBenito d4a48c
')
Chris PeBenito d4a48c
Chris PeBenito d4a48c
optional_policy(`
Chris PeBenito d6d16b
	nis_use_ypbind(tftpd_t)
Chris PeBenito d6d16b
')
Chris PeBenito d6d16b
Chris PeBenito d6d16b
optional_policy(`
Chris PeBenito 17de1b
	nscd_socket_use(tftpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
        seutil_sigchld_newrole(tftpd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
        udev_read_db(tftpd_t)
Chris PeBenito 17de1b
')