]> git.ipfire.org Git - people/stevee/selinux-policy.git/blame - refpolicy/policy/modules/services/dnsmasq.te
packets for admin modules
[people/stevee/selinux-policy.git] / refpolicy / policy / modules / services / dnsmasq.te
CommitLineData
9e725d8a
CP
1
2policy_module(dnsmasq,1.0.0)
3
4########################################
5#
6# Declarations
7#
8
9type dnsmasq_t;
10type dnsmasq_exec_t;
11init_daemon_domain(dnsmasq_t,dnsmasq_exec_t)
12
13type dnsmasq_lease_t;
14files_type(dnsmasq_lease_t)
15
16type dnsmasq_var_run_t;
17files_pid_file(dnsmasq_var_run_t)
18
19########################################
20#
21# Local policy
22#
23
24allow dnsmasq_t self:capability { setgid setuid net_bind_service net_raw };
25dontaudit dnsmasq_t self:capability sys_tty_config;
26allow dnsmasq_t self:process signal_perms;
27allow dnsmasq_t self:tcp_socket create_stream_socket_perms;
28allow dnsmasq_t self:udp_socket create_socket_perms;
29allow dnsmasq_t self:packet_socket create_socket_perms;
30allow dnsmasq_t self:rawip_socket create_socket_perms;
31
32# dhcp leases
33allow dnsmasq_t dnsmasq_lease_t:file manage_file_perms;
34files_var_lib_filetrans(dnsmasq_t,dnsmasq_lease_t,file)
35
36allow dnsmasq_t dnsmasq_var_run_t:file create_file_perms;
37allow dnsmasq_t dnsmasq_var_run_t:dir rw_dir_perms;
38files_pid_filetrans(dnsmasq_t,dnsmasq_var_run_t,file)
39
40kernel_read_kernel_sysctls(dnsmasq_t)
41kernel_list_proc(dnsmasq_t)
42kernel_read_proc_symlinks(dnsmasq_t)
43
44corenet_tcp_sendrecv_generic_if(dnsmasq_t)
45corenet_udp_sendrecv_generic_if(dnsmasq_t)
46corenet_raw_sendrecv_generic_if(dnsmasq_t)
47corenet_tcp_sendrecv_all_nodes(dnsmasq_t)
48corenet_udp_sendrecv_all_nodes(dnsmasq_t)
49corenet_raw_sendrecv_all_nodes(dnsmasq_t)
50corenet_tcp_sendrecv_all_ports(dnsmasq_t)
51corenet_udp_sendrecv_all_ports(dnsmasq_t)
52corenet_non_ipsec_sendrecv(dnsmasq_t)
53corenet_tcp_bind_all_nodes(dnsmasq_t)
54corenet_udp_bind_all_nodes(dnsmasq_t)
55corenet_tcp_bind_dns_port(dnsmasq_t)
56corenet_udp_bind_dns_port(dnsmasq_t)
57corenet_udp_bind_dhcpd_port(dnsmasq_t)
58
59dev_read_sysfs(dnsmasq_t)
60dev_read_urand(dnsmasq_t)
61
62domain_use_interactive_fds(dnsmasq_t)
63
64# allow access to dnsmasq.conf
65files_read_etc_files(dnsmasq_t)
66
67fs_getattr_all_fs(dnsmasq_t)
68fs_search_auto_mountpoints(dnsmasq_t)
69
70term_dontaudit_use_console(dnsmasq_t)
71
72init_use_fds(dnsmasq_t)
73init_use_script_ptys(dnsmasq_t)
74
75libs_use_ld_so(dnsmasq_t)
76libs_use_shared_libs(dnsmasq_t)
77
78logging_send_syslog_msg(dnsmasq_t)
79
80miscfiles_read_localization(dnsmasq_t)
81
82sysnet_read_config(dnsmasq_t)
83
84userdom_dontaudit_use_unpriv_user_fds(dnsmasq_t)
85userdom_dontaudit_search_sysadm_home_dirs(dnsmasq_t)
86
87ifdef(`targeted_policy',`
88 term_dontaudit_use_unallocated_ttys(dnsmasq_t)
89 term_dontaudit_use_generic_ptys(dnsmasq_t)
90 files_dontaudit_read_root_files(dnsmasq_t)
91')
92
93optional_policy(`
94 nis_use_ypbind(dnsmasq_t)
95')
96
97optional_policy(`
98 seutil_sigchld_newrole(dnsmasq_t)
99')
100
101optional_policy(`
102 udev_read_db(dnsmasq_t)
103')