selinux-policy/policy/modules/services/dnsmasq.te

101 lines
2.6 KiB
Plaintext
Raw Normal View History

2006-04-25 14:45:14 +00:00
2009-07-20 19:40:57 +00:00
policy_module(dnsmasq, 1.7.3)
2006-04-25 14:45:14 +00:00
########################################
#
# Declarations
#
type dnsmasq_t;
type dnsmasq_exec_t;
init_daemon_domain(dnsmasq_t, dnsmasq_exec_t)
2006-04-25 14:45:14 +00:00
2008-11-18 19:55:10 +00:00
type dnsmasq_initrc_exec_t;
init_script_file(dnsmasq_initrc_exec_t)
2006-04-25 14:45:14 +00:00
type dnsmasq_lease_t;
files_type(dnsmasq_lease_t)
type dnsmasq_var_run_t;
files_pid_file(dnsmasq_var_run_t)
########################################
#
# Local policy
#
allow dnsmasq_t self:capability { net_admin setgid setuid net_bind_service net_raw };
2006-04-25 14:45:14 +00:00
dontaudit dnsmasq_t self:capability sys_tty_config;
2008-11-18 19:55:10 +00:00
allow dnsmasq_t self:process { getcap setcap signal_perms };
allow dnsmasq_t self:fifo_file rw_fifo_file_perms;
allow dnsmasq_t self:netlink_route_socket { bind create nlmsg_read read write };
2006-04-25 14:45:14 +00:00
allow dnsmasq_t self:tcp_socket create_stream_socket_perms;
allow dnsmasq_t self:udp_socket create_socket_perms;
allow dnsmasq_t self:packet_socket create_socket_perms;
allow dnsmasq_t self:rawip_socket create_socket_perms;
# dhcp leases
2008-11-18 19:55:10 +00:00
manage_files_pattern(dnsmasq_t, dnsmasq_lease_t, dnsmasq_lease_t)
2009-06-26 14:40:13 +00:00
files_var_lib_filetrans(dnsmasq_t, dnsmasq_lease_t, file)
2006-04-25 14:45:14 +00:00
manage_files_pattern(dnsmasq_t, dnsmasq_var_run_t, dnsmasq_var_run_t)
files_pid_filetrans(dnsmasq_t, dnsmasq_var_run_t, file)
2006-04-25 14:45:14 +00:00
kernel_read_kernel_sysctls(dnsmasq_t)
2009-07-20 19:40:57 +00:00
kernel_read_system_state(dnsmasq_t)
2006-04-25 14:45:14 +00:00
corenet_all_recvfrom_unlabeled(dnsmasq_t)
corenet_all_recvfrom_netlabel(dnsmasq_t)
2006-04-25 14:45:14 +00:00
corenet_tcp_sendrecv_generic_if(dnsmasq_t)
corenet_udp_sendrecv_generic_if(dnsmasq_t)
corenet_raw_sendrecv_generic_if(dnsmasq_t)
corenet_tcp_sendrecv_generic_node(dnsmasq_t)
corenet_udp_sendrecv_generic_node(dnsmasq_t)
corenet_raw_sendrecv_generic_node(dnsmasq_t)
2006-04-25 14:45:14 +00:00
corenet_tcp_sendrecv_all_ports(dnsmasq_t)
corenet_udp_sendrecv_all_ports(dnsmasq_t)
corenet_tcp_bind_generic_node(dnsmasq_t)
corenet_udp_bind_generic_node(dnsmasq_t)
2006-04-25 14:45:14 +00:00
corenet_tcp_bind_dns_port(dnsmasq_t)
2008-11-18 19:55:10 +00:00
corenet_udp_bind_all_ports(dnsmasq_t)
2006-05-30 19:46:34 +00:00
corenet_sendrecv_dns_server_packets(dnsmasq_t)
corenet_sendrecv_dhcpd_server_packets(dnsmasq_t)
2006-04-25 14:45:14 +00:00
dev_read_sysfs(dnsmasq_t)
dev_read_urand(dnsmasq_t)
domain_use_interactive_fds(dnsmasq_t)
# allow access to dnsmasq.conf
files_read_etc_files(dnsmasq_t)
2009-03-23 14:56:43 +00:00
files_read_etc_runtime_files(dnsmasq_t)
2006-04-25 14:45:14 +00:00
fs_getattr_all_fs(dnsmasq_t)
fs_search_auto_mountpoints(dnsmasq_t)
2009-03-23 14:56:43 +00:00
auth_use_nsswitch(dnsmasq_t)
2006-04-25 14:45:14 +00:00
logging_send_syslog_msg(dnsmasq_t)
miscfiles_read_localization(dnsmasq_t)
userdom_dontaudit_use_unpriv_user_fds(dnsmasq_t)
2008-11-05 16:10:46 +00:00
userdom_dontaudit_search_user_home_dirs(dnsmasq_t)
2006-04-25 14:45:14 +00:00
optional_policy(`
seutil_sigchld_newrole(dnsmasq_t)
')
2009-07-20 19:40:57 +00:00
optional_policy(`
tftp_read_content(dnsmasq_t)
')
2006-04-25 14:45:14 +00:00
optional_policy(`
udev_read_db(dnsmasq_t)
')
2008-11-18 19:55:10 +00:00
optional_policy(`
virt_manage_lib_files(dnsmasq_t)
2009-03-23 14:56:43 +00:00
virt_read_pid_files(dnsmasq_t)
2008-11-18 19:55:10 +00:00
')