aboutsummaryrefslogtreecommitdiff
blob: 13e45826a3a65b44cc6a5f14c9e9054b822e4e21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
policy_module(dhcp, 1.16.1)

########################################
#
# Declarations
#

## <desc>
##	<p>
##	Determine whether DHCP daemon
##	can use LDAP backends.
##	</p>
## </desc>
gen_tunable(dhcpd_use_ldap, false)

type dhcpd_t;
type dhcpd_exec_t;
init_daemon_domain(dhcpd_t, dhcpd_exec_t)

type dhcpd_initrc_exec_t;
init_script_file(dhcpd_initrc_exec_t)

type dhcpd_state_t;
files_type(dhcpd_state_t)

type dhcpd_tmp_t;
files_tmp_file(dhcpd_tmp_t)

type dhcpd_unit_t;
init_unit_file(dhcpd_unit_t)

type dhcpd_var_run_t;
files_pid_file(dhcpd_var_run_t)

########################################
#
# Local policy
#

allow dhcpd_t self:capability { chown dac_override net_raw setgid setuid sys_chroot sys_resource };
dontaudit dhcpd_t self:capability { net_admin sys_tty_config };
allow dhcpd_t self:process { getcap setcap signal_perms };
allow dhcpd_t self:fifo_file rw_fifo_file_perms;
allow dhcpd_t self:tcp_socket { accept listen };
allow dhcpd_t self:packet_socket create_socket_perms;
allow dhcpd_t self:rawip_socket create_socket_perms;

manage_files_pattern(dhcpd_t, dhcpd_state_t, dhcpd_state_t)
sysnet_dhcp_state_filetrans(dhcpd_t, dhcpd_state_t, file)

manage_dirs_pattern(dhcpd_t, dhcpd_tmp_t, dhcpd_tmp_t)
manage_files_pattern(dhcpd_t, dhcpd_tmp_t, dhcpd_tmp_t)
files_tmp_filetrans(dhcpd_t, dhcpd_tmp_t, { dir file })

manage_files_pattern(dhcpd_t, dhcpd_var_run_t, dhcpd_var_run_t)
files_pid_filetrans(dhcpd_t, dhcpd_var_run_t, file)

can_exec(dhcpd_t, dhcpd_exec_t)

kernel_read_system_state(dhcpd_t)
kernel_read_kernel_sysctls(dhcpd_t)
kernel_read_network_state(dhcpd_t)

corenet_all_recvfrom_unlabeled(dhcpd_t)
corenet_all_recvfrom_netlabel(dhcpd_t)
corenet_tcp_sendrecv_generic_if(dhcpd_t)
corenet_udp_sendrecv_generic_if(dhcpd_t)
corenet_raw_sendrecv_generic_if(dhcpd_t)
corenet_tcp_sendrecv_generic_node(dhcpd_t)
corenet_udp_sendrecv_generic_node(dhcpd_t)
corenet_raw_sendrecv_generic_node(dhcpd_t)
corenet_tcp_sendrecv_all_ports(dhcpd_t)
corenet_udp_sendrecv_all_ports(dhcpd_t)
corenet_tcp_bind_generic_node(dhcpd_t)
corenet_udp_bind_generic_node(dhcpd_t)

corenet_sendrecv_dhcpd_server_packets(dhcpd_t)
corenet_tcp_bind_dhcpd_port(dhcpd_t)
corenet_udp_bind_dhcpd_port(dhcpd_t)

corenet_sendrecv_pxe_server_packets(dhcpd_t)
corenet_udp_bind_pxe_port(dhcpd_t)

corenet_sendrecv_all_client_packets(dhcpd_t)
corenet_tcp_connect_all_ports(dhcpd_t)

corenet_udp_bind_all_unreserved_ports(dhcpd_t)

corecmd_exec_bin(dhcpd_t)

dev_read_sysfs(dhcpd_t)
dev_read_rand(dhcpd_t)
dev_read_urand(dhcpd_t)

fs_getattr_all_fs(dhcpd_t)
fs_search_auto_mountpoints(dhcpd_t)

domain_use_interactive_fds(dhcpd_t)

files_read_usr_files(dhcpd_t)
files_read_etc_runtime_files(dhcpd_t)
files_search_var_lib(dhcpd_t)

auth_use_nsswitch(dhcpd_t)

logging_send_syslog_msg(dhcpd_t)

miscfiles_read_generic_certs(dhcpd_t)
miscfiles_read_localization(dhcpd_t)

sysnet_read_dhcp_config(dhcpd_t)

userdom_dontaudit_use_unpriv_user_fds(dhcpd_t)
userdom_dontaudit_search_user_home_dirs(dhcpd_t)

tunable_policy(`dhcpd_use_ldap',`
	sysnet_use_ldap(dhcpd_t)
')

optional_policy(`
	bind_read_dnssec_keys(dhcpd_t)
')

optional_policy(`
	dbus_system_bus_client(dhcpd_t)
	dbus_connect_system_bus(dhcpd_t)
')

optional_policy(`
	seutil_sigchld_newrole(dhcpd_t)
')

optional_policy(`
	udev_read_db(dhcpd_t)
')