]>
Commit | Line | Data |
---|---|---|
9e725d8a | 1 | |
9570b288 | 2 | policy_module(dnsmasq, 1.8.0) |
9e725d8a CP |
3 | |
4 | ######################################## | |
5 | # | |
6 | # Declarations | |
7 | # | |
8 | ||
9 | type dnsmasq_t; | |
10 | type dnsmasq_exec_t; | |
0bfccda4 | 11 | init_daemon_domain(dnsmasq_t, dnsmasq_exec_t) |
9e725d8a | 12 | |
01e9e7db CP |
13 | type dnsmasq_initrc_exec_t; |
14 | init_script_file(dnsmasq_initrc_exec_t) | |
15 | ||
9e725d8a CP |
16 | type dnsmasq_lease_t; |
17 | files_type(dnsmasq_lease_t) | |
18 | ||
19 | type dnsmasq_var_run_t; | |
20 | files_pid_file(dnsmasq_var_run_t) | |
21 | ||
22 | ######################################## | |
23 | # | |
24 | # Local policy | |
25 | # | |
26 | ||
ed38ca9f | 27 | allow dnsmasq_t self:capability { net_admin setgid setuid net_bind_service net_raw }; |
9e725d8a | 28 | dontaudit dnsmasq_t self:capability sys_tty_config; |
01e9e7db | 29 | allow dnsmasq_t self:process { getcap setcap signal_perms }; |
0b36a214 | 30 | allow dnsmasq_t self:fifo_file rw_fifo_file_perms; |
ed38ca9f | 31 | allow dnsmasq_t self:netlink_route_socket { bind create nlmsg_read read write }; |
9e725d8a CP |
32 | allow dnsmasq_t self:tcp_socket create_stream_socket_perms; |
33 | allow dnsmasq_t self:udp_socket create_socket_perms; | |
34 | allow dnsmasq_t self:packet_socket create_socket_perms; | |
35 | allow dnsmasq_t self:rawip_socket create_socket_perms; | |
36 | ||
37 | # dhcp leases | |
01e9e7db | 38 | manage_files_pattern(dnsmasq_t, dnsmasq_lease_t, dnsmasq_lease_t) |
3f67f722 | 39 | files_var_lib_filetrans(dnsmasq_t, dnsmasq_lease_t, file) |
9e725d8a | 40 | |
0bfccda4 CP |
41 | manage_files_pattern(dnsmasq_t, dnsmasq_var_run_t, dnsmasq_var_run_t) |
42 | files_pid_filetrans(dnsmasq_t, dnsmasq_var_run_t, file) | |
9e725d8a CP |
43 | |
44 | kernel_read_kernel_sysctls(dnsmasq_t) | |
8f17f7c2 | 45 | kernel_read_system_state(dnsmasq_t) |
9e725d8a | 46 | |
19006686 CP |
47 | corenet_all_recvfrom_unlabeled(dnsmasq_t) |
48 | corenet_all_recvfrom_netlabel(dnsmasq_t) | |
9e725d8a CP |
49 | corenet_tcp_sendrecv_generic_if(dnsmasq_t) |
50 | corenet_udp_sendrecv_generic_if(dnsmasq_t) | |
51 | corenet_raw_sendrecv_generic_if(dnsmasq_t) | |
c1262146 CP |
52 | corenet_tcp_sendrecv_generic_node(dnsmasq_t) |
53 | corenet_udp_sendrecv_generic_node(dnsmasq_t) | |
54 | corenet_raw_sendrecv_generic_node(dnsmasq_t) | |
9e725d8a CP |
55 | corenet_tcp_sendrecv_all_ports(dnsmasq_t) |
56 | corenet_udp_sendrecv_all_ports(dnsmasq_t) | |
c1262146 CP |
57 | corenet_tcp_bind_generic_node(dnsmasq_t) |
58 | corenet_udp_bind_generic_node(dnsmasq_t) | |
9e725d8a | 59 | corenet_tcp_bind_dns_port(dnsmasq_t) |
01e9e7db | 60 | corenet_udp_bind_all_ports(dnsmasq_t) |
141cffdd CP |
61 | corenet_sendrecv_dns_server_packets(dnsmasq_t) |
62 | corenet_sendrecv_dhcpd_server_packets(dnsmasq_t) | |
9e725d8a CP |
63 | |
64 | dev_read_sysfs(dnsmasq_t) | |
65 | dev_read_urand(dnsmasq_t) | |
66 | ||
67 | domain_use_interactive_fds(dnsmasq_t) | |
68 | ||
69 | # allow access to dnsmasq.conf | |
70 | files_read_etc_files(dnsmasq_t) | |
8f800d48 | 71 | files_read_etc_runtime_files(dnsmasq_t) |
9e725d8a CP |
72 | |
73 | fs_getattr_all_fs(dnsmasq_t) | |
74 | fs_search_auto_mountpoints(dnsmasq_t) | |
75 | ||
8f800d48 CP |
76 | auth_use_nsswitch(dnsmasq_t) |
77 | ||
9e725d8a CP |
78 | logging_send_syslog_msg(dnsmasq_t) |
79 | ||
80 | miscfiles_read_localization(dnsmasq_t) | |
81 | ||
9e725d8a | 82 | userdom_dontaudit_use_unpriv_user_fds(dnsmasq_t) |
296273a7 | 83 | userdom_dontaudit_search_user_home_dirs(dnsmasq_t) |
9e725d8a | 84 | |
9e725d8a CP |
85 | optional_policy(` |
86 | seutil_sigchld_newrole(dnsmasq_t) | |
87 | ') | |
88 | ||
8f17f7c2 CP |
89 | optional_policy(` |
90 | tftp_read_content(dnsmasq_t) | |
91 | ') | |
92 | ||
9e725d8a CP |
93 | optional_policy(` |
94 | udev_read_db(dnsmasq_t) | |
95 | ') | |
01e9e7db CP |
96 | |
97 | optional_policy(` | |
98 | virt_manage_lib_files(dnsmasq_t) | |
8f800d48 | 99 | virt_read_pid_files(dnsmasq_t) |
01e9e7db | 100 | ') |