Chris PeBenito 44d5d9
## <summary>small and secure DNS daemon</summary>
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
########################################
Chris PeBenito 44d5d9
## <summary>
Chris PeBenito 44d5d9
##      Create a set of derived types for djbdns 
Chris PeBenito 44d5d9
##	components that are directly supervised by daemontools.
Chris PeBenito 44d5d9
## </summary>
Chris PeBenito 44d5d9
## <param name="prefix">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 44d5d9
##      The prefix to be used for deriving type names.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 44d5d9
## </param>
Chris PeBenito 44d5d9
#
Chris PeBenito 44d5d9
template(`djbdns_daemontools_domain_template',`
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	type djbdns_$1_t;
Chris PeBenito 44d5d9
	type djbdns_$1_exec_t;
Chris PeBenito 44d5d9
	type djbdns_$1_conf_t;
Chris PeBenito 44d5d9
	files_config_file(djbdns_$1_conf_t)
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	domain_type(djbdns_$1_t)
Chris PeBenito 44d5d9
	domain_entry_file(djbdns_$1_t,djbdns_$1_exec_t)
Chris PeBenito 44d5d9
	role system_r types djbdns_$1_t;
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	daemontools_service_domain(djbdns_$1_t, djbdns_$1_exec_t)
Chris PeBenito 44d5d9
	daemontools_read_svc(djbdns_$1_t)
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	allow djbdns_$1_t self:capability { net_bind_service setgid setuid sys_chroot };
Chris PeBenito 44d5d9
	allow djbdns_$1_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 44d5d9
	allow djbdns_$1_t self:udp_socket create_socket_perms;
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	allow djbdns_$1_t djbdns_$1_conf_t:dir r_dir_perms;
Chris PeBenito 44d5d9
	allow djbdns_$1_t djbdns_$1_conf_t:file r_file_perms;
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	corenet_tcp_sendrecv_all_if(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_udp_sendrecv_all_if(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_tcp_sendrecv_all_nodes(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_udp_sendrecv_all_nodes(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_tcp_sendrecv_all_ports(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_udp_sendrecv_all_ports(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_non_ipsec_sendrecv(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_tcp_bind_all_nodes(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_udp_bind_all_nodes(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_tcp_bind_dns_port(djbdns_$1_t)
Chris PeBenito 44d5d9
	corenet_udp_bind_dns_port(djbdns_$1_t)
Chris PeBenito 76b519
	corenet_udp_bind_generic_port(djbdns_$1_t)
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	files_search_var(djbdns_$1_t)
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
	libs_use_ld_so(djbdns_$1_t)
Chris PeBenito 44d5d9
	libs_use_shared_libs(djbdns_$1_t)
Chris PeBenito 44d5d9
Chris PeBenito 44d5d9
')
Chris PeBenito 44d5d9