Chris PeBenito 9e725d
Chris PeBenito 9e725d
policy_module(dnsmasq,1.0.0)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
########################################
Chris PeBenito 9e725d
#
Chris PeBenito 9e725d
# Declarations
Chris PeBenito 9e725d
#
Chris PeBenito 9e725d
Chris PeBenito 9e725d
type dnsmasq_t;
Chris PeBenito 9e725d
type dnsmasq_exec_t;
Chris PeBenito 9e725d
init_daemon_domain(dnsmasq_t,dnsmasq_exec_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
type dnsmasq_lease_t;
Chris PeBenito 9e725d
files_type(dnsmasq_lease_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
type dnsmasq_var_run_t;
Chris PeBenito 9e725d
files_pid_file(dnsmasq_var_run_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
########################################
Chris PeBenito 9e725d
#
Chris PeBenito 9e725d
# Local policy
Chris PeBenito 9e725d
#
Chris PeBenito 9e725d
Chris PeBenito 9e725d
allow dnsmasq_t self:capability { setgid setuid net_bind_service net_raw };
Chris PeBenito 9e725d
dontaudit dnsmasq_t self:capability sys_tty_config;
Chris PeBenito 9e725d
allow dnsmasq_t self:process signal_perms;
Chris PeBenito 9e725d
allow dnsmasq_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 9e725d
allow dnsmasq_t self:udp_socket create_socket_perms;
Chris PeBenito 9e725d
allow dnsmasq_t self:packet_socket create_socket_perms;
Chris PeBenito 9e725d
allow dnsmasq_t self:rawip_socket create_socket_perms;
Chris PeBenito 9e725d
Chris PeBenito 9e725d
# dhcp leases
Chris PeBenito 9e725d
allow dnsmasq_t dnsmasq_lease_t:file manage_file_perms;
Chris PeBenito 9e725d
files_var_lib_filetrans(dnsmasq_t,dnsmasq_lease_t,file)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
allow dnsmasq_t dnsmasq_var_run_t:file create_file_perms;
Chris PeBenito 9e725d
allow dnsmasq_t dnsmasq_var_run_t:dir rw_dir_perms;
Chris PeBenito 9e725d
files_pid_filetrans(dnsmasq_t,dnsmasq_var_run_t,file)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
kernel_read_kernel_sysctls(dnsmasq_t)
Chris PeBenito 9e725d
kernel_list_proc(dnsmasq_t)
Chris PeBenito 9e725d
kernel_read_proc_symlinks(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
corenet_tcp_sendrecv_generic_if(dnsmasq_t)
Chris PeBenito 9e725d
corenet_udp_sendrecv_generic_if(dnsmasq_t)
Chris PeBenito 9e725d
corenet_raw_sendrecv_generic_if(dnsmasq_t)
Chris PeBenito 9e725d
corenet_tcp_sendrecv_all_nodes(dnsmasq_t)
Chris PeBenito 9e725d
corenet_udp_sendrecv_all_nodes(dnsmasq_t)
Chris PeBenito 9e725d
corenet_raw_sendrecv_all_nodes(dnsmasq_t)
Chris PeBenito 9e725d
corenet_tcp_sendrecv_all_ports(dnsmasq_t)
Chris PeBenito 9e725d
corenet_udp_sendrecv_all_ports(dnsmasq_t)
Chris PeBenito 9e725d
corenet_non_ipsec_sendrecv(dnsmasq_t)
Chris PeBenito 9e725d
corenet_tcp_bind_all_nodes(dnsmasq_t)
Chris PeBenito 9e725d
corenet_udp_bind_all_nodes(dnsmasq_t)
Chris PeBenito 9e725d
corenet_tcp_bind_dns_port(dnsmasq_t)
Chris PeBenito 9e725d
corenet_udp_bind_dns_port(dnsmasq_t)
Chris PeBenito 9e725d
corenet_udp_bind_dhcpd_port(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
dev_read_sysfs(dnsmasq_t)
Chris PeBenito 9e725d
dev_read_urand(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
domain_use_interactive_fds(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
# allow access to dnsmasq.conf
Chris PeBenito 9e725d
files_read_etc_files(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
fs_getattr_all_fs(dnsmasq_t)
Chris PeBenito 9e725d
fs_search_auto_mountpoints(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
term_dontaudit_use_console(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
init_use_fds(dnsmasq_t)
Chris PeBenito 9e725d
init_use_script_ptys(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
libs_use_ld_so(dnsmasq_t)
Chris PeBenito 9e725d
libs_use_shared_libs(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
logging_send_syslog_msg(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
miscfiles_read_localization(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
sysnet_read_config(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
userdom_dontaudit_use_unpriv_user_fds(dnsmasq_t)
Chris PeBenito 9e725d
userdom_dontaudit_search_sysadm_home_dirs(dnsmasq_t)
Chris PeBenito 9e725d
Chris PeBenito 9e725d
ifdef(`targeted_policy',`
Chris PeBenito 9e725d
	term_dontaudit_use_unallocated_ttys(dnsmasq_t)
Chris PeBenito 9e725d
	term_dontaudit_use_generic_ptys(dnsmasq_t)
Chris PeBenito 9e725d
	files_dontaudit_read_root_files(dnsmasq_t)
Chris PeBenito 9e725d
')
Chris PeBenito 9e725d
Chris PeBenito 9e725d
optional_policy(`
Chris PeBenito 9e725d
	nis_use_ypbind(dnsmasq_t)
Chris PeBenito 9e725d
')
Chris PeBenito 9e725d
Chris PeBenito 9e725d
optional_policy(`
Chris PeBenito 9e725d
	seutil_sigchld_newrole(dnsmasq_t)
Chris PeBenito 9e725d
')
Chris PeBenito 9e725d
Chris PeBenito 9e725d
optional_policy(`
Chris PeBenito 9e725d
	udev_read_db(dnsmasq_t)
Chris PeBenito 9e725d
')