1900668638
The latest revision of the labeled policy patches which enable both labeled and unlabeled policy support for NetLabel. This revision takes into account Chris' feedback from the first version and reduces the number of interface calls in each domain down to two at present: one for unlabeled access, one for NetLabel access. The older, transport layer specific interfaces, are still present for use by third-party modules but are not used in the default policy modules. trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore. This patch changes the policy to use the netmsg initial SID as the "base" SID/context for NetLabel packets which only have MLS security attributes. Currently we use the unlabeled initial SID which makes it very difficult to distinquish between actual unlabeled packets and those packets which have MLS security attributes.
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
## <summary>small and secure DNS daemon</summary>
|
|
|
|
########################################
|
|
## <summary>
|
|
## Create a set of derived types for djbdns
|
|
## components that are directly supervised by daemontools.
|
|
## </summary>
|
|
## <param name="prefix">
|
|
## <summary>
|
|
## The prefix to be used for deriving type names.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
template(`djbdns_daemontools_domain_template',`
|
|
|
|
type djbdns_$1_t;
|
|
type djbdns_$1_exec_t;
|
|
type djbdns_$1_conf_t;
|
|
files_config_file(djbdns_$1_conf_t)
|
|
|
|
domain_type(djbdns_$1_t)
|
|
domain_entry_file(djbdns_$1_t,djbdns_$1_exec_t)
|
|
role system_r types djbdns_$1_t;
|
|
|
|
daemontools_service_domain(djbdns_$1_t, djbdns_$1_exec_t)
|
|
daemontools_read_svc(djbdns_$1_t)
|
|
|
|
allow djbdns_$1_t self:capability { net_bind_service setgid setuid sys_chroot };
|
|
allow djbdns_$1_t self:tcp_socket create_stream_socket_perms;
|
|
allow djbdns_$1_t self:udp_socket create_socket_perms;
|
|
|
|
allow djbdns_$1_t djbdns_$1_conf_t:dir list_dir_perms;
|
|
allow djbdns_$1_t djbdns_$1_conf_t:file read_file_perms;
|
|
|
|
corenet_all_recvfrom_unlabeled(djbdns_$1_t)
|
|
corenet_all_recvfrom_netlabel(djbdns_$1_t)
|
|
corenet_tcp_sendrecv_all_if(djbdns_$1_t)
|
|
corenet_udp_sendrecv_all_if(djbdns_$1_t)
|
|
corenet_tcp_sendrecv_all_nodes(djbdns_$1_t)
|
|
corenet_udp_sendrecv_all_nodes(djbdns_$1_t)
|
|
corenet_tcp_sendrecv_all_ports(djbdns_$1_t)
|
|
corenet_udp_sendrecv_all_ports(djbdns_$1_t)
|
|
corenet_tcp_bind_all_nodes(djbdns_$1_t)
|
|
corenet_udp_bind_all_nodes(djbdns_$1_t)
|
|
corenet_tcp_bind_dns_port(djbdns_$1_t)
|
|
corenet_udp_bind_dns_port(djbdns_$1_t)
|
|
corenet_udp_bind_generic_port(djbdns_$1_t)
|
|
corenet_sendrecv_dns_server_packets(djbdns_$1_t)
|
|
corenet_sendrecv_generic_server_packets(djbdns_$1_t)
|
|
|
|
files_search_var(djbdns_$1_t)
|
|
|
|
libs_use_ld_so(djbdns_$1_t)
|
|
libs_use_shared_libs(djbdns_$1_t)
|
|
')
|