Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/services/, policy/modules/admin/, policy/modules/kernel/, ...
Date: Sun, 07 May 2017 16:09:13
Message-Id: 1494172398.ad561b6028cb137e4169876737059997eec4b2ee.perfinion@gentoo
1 commit: ad561b6028cb137e4169876737059997eec4b2ee
2 Author: Nicolas Iooss <nicolas.iooss <AT> m4x <DOT> org>
3 AuthorDate: Sat Apr 15 18:49:07 2017 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Sun May 7 15:53:18 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=ad561b60
7
8 Support systems with a single /usr/bin directory
9
10 On systems such as Arch Linux, all programs which are usually located in
11 /bin, /sbin, /usr/bin and /usr/sbin are present in /usr/bin and the
12 other locations are symbolic links to this directory. With such a
13 configuration, the file contexts which define types for files in
14 /bin, /sbin and /usr/sbin need to be duplicated to provide definitions
15 for /usr/bin/...
16
17 As the "/bin vs. /usr/bin" part of the needed definitions has already
18 been done with the "usr merge" patches, the next step consists in
19 duplicating file contexts for /usr/sbin. This is what this patch does
20 for all modules which are not in contrib.
21
22 This is the second iteration of an idea I have previously posted on
23 http://oss.tresys.com/pipermail/refpolicy/2017-March/009176.html
24
25 policy/modules/admin/bootloader.fc | 8 +++++
26 policy/modules/admin/consoletype.fc | 2 ++
27 policy/modules/admin/netutils.fc | 5 +++
28 policy/modules/admin/usermanage.fc | 12 +++++++
29 policy/modules/apps/seunshare.fc | 2 ++
30 policy/modules/kernel/corecommands.fc | 6 ++++
31 policy/modules/services/ssh.fc | 1 +
32 policy/modules/services/xserver.fc | 1 +
33 policy/modules/system/authlogin.fc | 9 +++++-
34 policy/modules/system/clock.fc | 2 ++
35 policy/modules/system/fstools.fc | 59 ++++++++++++++++++++++++++++++++---
36 policy/modules/system/getty.fc | 2 ++
37 policy/modules/system/hotplug.fc | 3 ++
38 policy/modules/system/init.fc | 3 ++
39 policy/modules/system/ipsec.fc | 5 +++
40 policy/modules/system/iptables.fc | 14 +++++++++
41 policy/modules/system/libraries.fc | 2 ++
42 policy/modules/system/locallogin.fc | 3 ++
43 policy/modules/system/logging.fc | 12 +++++++
44 policy/modules/system/lvm.fc | 55 ++++++++++++++++++++++++++++++--
45 policy/modules/system/modutils.fc | 7 +++++
46 policy/modules/system/mount.fc | 2 ++
47 policy/modules/system/netlabel.fc | 2 ++
48 policy/modules/system/selinuxutil.fc | 8 +++++
49 policy/modules/system/setrans.fc | 2 ++
50 policy/modules/system/sysnetwork.fc | 17 ++++++++--
51 policy/modules/system/udev.fc | 10 +++---
52 27 files changed, 241 insertions(+), 13 deletions(-)
53
54 diff --git a/policy/modules/admin/bootloader.fc b/policy/modules/admin/bootloader.fc
55 index c3e8341f..f21a5e49 100644
56 --- a/policy/modules/admin/bootloader.fc
57 +++ b/policy/modules/admin/bootloader.fc
58 @@ -2,6 +2,14 @@
59 /etc/lilo\.conf.* -- gen_context(system_u:object_r:bootloader_etc_t,s0)
60 /etc/yaboot\.conf.* -- gen_context(system_u:object_r:bootloader_etc_t,s0)
61
62 +/usr/bin/grub -- gen_context(system_u:object_r:bootloader_exec_t,s0)
63 +/usr/bin/grub2?-bios-setup -- gen_context(system_u:object_r:bootloader_exec_t,s0)
64 +/usr/bin/grub2?-install -- gen_context(system_u:object_r:bootloader_exec_t,s0)
65 +/usr/bin/grub2?-mkconfig -- gen_context(system_u:object_r:bootloader_exec_t,s0)
66 +/usr/bin/grub2?-probe -- gen_context(system_u:object_r:bootloader_exec_t,s0)
67 +/usr/bin/lilo.* -- gen_context(system_u:object_r:bootloader_exec_t,s0)
68 +/usr/bin/ybin.* -- gen_context(system_u:object_r:bootloader_exec_t,s0)
69 +
70 /usr/sbin/grub -- gen_context(system_u:object_r:bootloader_exec_t,s0)
71 /usr/sbin/grub2?-bios-setup -- gen_context(system_u:object_r:bootloader_exec_t,s0)
72 /usr/sbin/grub2?-install -- gen_context(system_u:object_r:bootloader_exec_t,s0)
73
74 diff --git a/policy/modules/admin/consoletype.fc b/policy/modules/admin/consoletype.fc
75 index c5190eef..4e07dca2 100644
76 --- a/policy/modules/admin/consoletype.fc
77 +++ b/policy/modules/admin/consoletype.fc
78 @@ -1 +1,3 @@
79 +/usr/bin/consoletype -- gen_context(system_u:object_r:consoletype_exec_t,s0)
80 +
81 /usr/sbin/consoletype -- gen_context(system_u:object_r:consoletype_exec_t,s0)
82
83 diff --git a/policy/modules/admin/netutils.fc b/policy/modules/admin/netutils.fc
84 index 5041c105..4f77e1cc 100644
85 --- a/policy/modules/admin/netutils.fc
86 +++ b/policy/modules/admin/netutils.fc
87 @@ -1,7 +1,12 @@
88 /usr/bin/arping -- gen_context(system_u:object_r:netutils_exec_t,s0)
89 +/usr/bin/fping -- gen_context(system_u:object_r:ping_exec_t,s0)
90 +/usr/bin/hping2 -- gen_context(system_u:object_r:ping_exec_t,s0)
91 +/usr/bin/iptstate -- gen_context(system_u:object_r:netutils_exec_t,s0)
92 /usr/bin/lft -- gen_context(system_u:object_r:traceroute_exec_t,s0)
93 /usr/bin/nmap -- gen_context(system_u:object_r:traceroute_exec_t,s0)
94 /usr/bin/ping.* -- gen_context(system_u:object_r:ping_exec_t,s0)
95 +/usr/bin/send_arp -- gen_context(system_u:object_r:ping_exec_t,s0)
96 +/usr/bin/tcpdump -- gen_context(system_u:object_r:netutils_exec_t,s0)
97 /usr/bin/tracepath.* -- gen_context(system_u:object_r:traceroute_exec_t,s0)
98 /usr/bin/traceroute.* -- gen_context(system_u:object_r:traceroute_exec_t,s0)
99
100
101 diff --git a/policy/modules/admin/usermanage.fc b/policy/modules/admin/usermanage.fc
102 index 0e00005a..620eefc6 100644
103 --- a/policy/modules/admin/usermanage.fc
104 +++ b/policy/modules/admin/usermanage.fc
105 @@ -5,8 +5,20 @@ ifdef(`distro_debian',`
106 /usr/bin/chage -- gen_context(system_u:object_r:passwd_exec_t,s0)
107 /usr/bin/chfn -- gen_context(system_u:object_r:chfn_exec_t,s0)
108 /usr/bin/chsh -- gen_context(system_u:object_r:chfn_exec_t,s0)
109 +/usr/bin/crack_[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0)
110 +/usr/bin/cracklib-[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0)
111 /usr/bin/gpasswd -- gen_context(system_u:object_r:groupadd_exec_t,s0)
112 +/usr/bin/groupadd -- gen_context(system_u:object_r:groupadd_exec_t,s0)
113 +/usr/bin/groupdel -- gen_context(system_u:object_r:groupadd_exec_t,s0)
114 +/usr/bin/groupmod -- gen_context(system_u:object_r:groupadd_exec_t,s0)
115 +/usr/bin/grpconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
116 +/usr/bin/grpunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
117 /usr/bin/passwd -- gen_context(system_u:object_r:passwd_exec_t,s0)
118 +/usr/bin/pwconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
119 +/usr/bin/pwunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
120 +/usr/bin/useradd -- gen_context(system_u:object_r:useradd_exec_t,s0)
121 +/usr/bin/userdel -- gen_context(system_u:object_r:useradd_exec_t,s0)
122 +/usr/bin/usermod -- gen_context(system_u:object_r:useradd_exec_t,s0)
123 /usr/bin/vigr -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
124 /usr/bin/vipw -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
125
126
127 diff --git a/policy/modules/apps/seunshare.fc b/policy/modules/apps/seunshare.fc
128 index 30a4b9fd..3899b4c1 100644
129 --- a/policy/modules/apps/seunshare.fc
130 +++ b/policy/modules/apps/seunshare.fc
131 @@ -1 +1,3 @@
132 +/usr/bin/seunshare -- gen_context(system_u:object_r:seunshare_exec_t,s0)
133 +
134 /usr/sbin/seunshare -- gen_context(system_u:object_r:seunshare_exec_t,s0)
135
136 diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
137 index 4b395d99..fe1a5e13 100644
138 --- a/policy/modules/kernel/corecommands.fc
139 +++ b/policy/modules/kernel/corecommands.fc
140 @@ -143,11 +143,17 @@ ifdef(`distro_gentoo',`
141 /usr/bin/bash2 -- gen_context(system_u:object_r:shell_exec_t,s0)
142 /usr/bin/fish -- gen_context(system_u:object_r:shell_exec_t,s0)
143 /usr/bin/git-shell -- gen_context(system_u:object_r:shell_exec_t,s0)
144 +/usr/bin/insmod_ksymoops_clean -- gen_context(system_u:object_r:bin_t,s0)
145 /usr/bin/ksh.* -- gen_context(system_u:object_r:shell_exec_t,s0)
146 +/usr/bin/mkfs\.cramfs -- gen_context(system_u:object_r:bin_t,s0)
147 /usr/bin/mksh -- gen_context(system_u:object_r:shell_exec_t,s0)
148 /usr/bin/mountpoint -- gen_context(system_u:object_r:bin_t,s0)
149 +/usr/bin/nologin -- gen_context(system_u:object_r:shell_exec_t,s0)
150 /usr/bin/sash -- gen_context(system_u:object_r:shell_exec_t,s0)
151 +/usr/bin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0)
152 /usr/bin/scponly -- gen_context(system_u:object_r:shell_exec_t,s0)
153 +/usr/bin/scponlyc -- gen_context(system_u:object_r:shell_exec_t,s0)
154 +/usr/bin/smrsh -- gen_context(system_u:object_r:shell_exec_t,s0)
155 /usr/bin/tcsh -- gen_context(system_u:object_r:shell_exec_t,s0)
156 /usr/bin/yash -- gen_context(system_u:object_r:shell_exec_t,s0)
157 /usr/bin/zsh.* -- gen_context(system_u:object_r:shell_exec_t,s0)
158
159 diff --git a/policy/modules/services/ssh.fc b/policy/modules/services/ssh.fc
160 index 71fd227a..4ac3e733 100644
161 --- a/policy/modules/services/ssh.fc
162 +++ b/policy/modules/services/ssh.fc
163 @@ -6,6 +6,7 @@ HOME_DIR/\.ssh(/.*)? gen_context(system_u:object_r:ssh_home_t,s0)
164 /usr/bin/ssh -- gen_context(system_u:object_r:ssh_exec_t,s0)
165 /usr/bin/ssh-agent -- gen_context(system_u:object_r:ssh_agent_exec_t,s0)
166 /usr/bin/ssh-keygen -- gen_context(system_u:object_r:ssh_keygen_exec_t,s0)
167 +/usr/bin/sshd -- gen_context(system_u:object_r:sshd_exec_t,s0)
168
169 /usr/lib/openssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0)
170 /usr/lib/ssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0)
171
172 diff --git a/policy/modules/services/xserver.fc b/policy/modules/services/xserver.fc
173 index 201d28fa..f0392c94 100644
174 --- a/policy/modules/services/xserver.fc
175 +++ b/policy/modules/services/xserver.fc
176 @@ -70,6 +70,7 @@ HOME_DIR/\.Xauthority.* -- gen_context(system_u:object_r:xauth_home_t,s0)
177 /usr/bin/sddm -- gen_context(system_u:object_r:xdm_exec_t,s0)
178 /usr/bin/gpe-dm -- gen_context(system_u:object_r:xdm_exec_t,s0)
179 /usr/bin/iceauth -- gen_context(system_u:object_r:iceauth_exec_t,s0)
180 +/usr/bin/lightdm -- gen_context(system_u:object_r:xdm_exec_t,s0)
181 /usr/bin/slim -- gen_context(system_u:object_r:xdm_exec_t,s0)
182 /usr/bin/Xair -- gen_context(system_u:object_r:xserver_exec_t,s0)
183 /usr/bin/xauth -- gen_context(system_u:object_r:xauth_exec_t,s0)
184
185 diff --git a/policy/modules/system/authlogin.fc b/policy/modules/system/authlogin.fc
186 index d68f6bb9..68f61737 100644
187 --- a/policy/modules/system/authlogin.fc
188 +++ b/policy/modules/system/authlogin.fc
189 @@ -5,13 +5,20 @@
190 /etc/shadow.* -- gen_context(system_u:object_r:shadow_t,s0)
191
192 /usr/bin/login -- gen_context(system_u:object_r:login_exec_t,s0)
193 +/usr/bin/pam_console_apply -- gen_context(system_u:object_r:pam_console_exec_t,s0)
194 +/usr/bin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
195 +/usr/bin/unix_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
196 +/usr/bin/unix_update -- gen_context(system_u:object_r:updpwd_exec_t,s0)
197 +/usr/bin/unix_verify -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
198 +/usr/bin/utempter -- gen_context(system_u:object_r:utempter_exec_t,s0)
199 +/usr/bin/validate -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
200
201 /usr/kerberos/sbin/login\.krb5 -- gen_context(system_u:object_r:login_exec_t,s0)
202
203 /usr/lib/utempter/utempter -- gen_context(system_u:object_r:utempter_exec_t,s0)
204
205 /usr/sbin/pam_console_apply -- gen_context(system_u:object_r:pam_console_exec_t,s0)
206 -/usr/sbin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
207 +/usr/sbin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
208 /usr/sbin/unix_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
209 /usr/sbin/unix_update -- gen_context(system_u:object_r:updpwd_exec_t,s0)
210 /usr/sbin/unix_verify -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
211
212 diff --git a/policy/modules/system/clock.fc b/policy/modules/system/clock.fc
213 index 61e6fe5d..30196589 100644
214 --- a/policy/modules/system/clock.fc
215 +++ b/policy/modules/system/clock.fc
216 @@ -1,3 +1,5 @@
217 /etc/adjtime -- gen_context(system_u:object_r:adjtime_t,s0)
218
219 +/usr/bin/hwclock -- gen_context(system_u:object_r:hwclock_exec_t,s0)
220 +
221 /usr/sbin/hwclock -- gen_context(system_u:object_r:hwclock_exec_t,s0)
222
223 diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc
224 index 4dca3edf..71dad308 100644
225 --- a/policy/modules/system/fstools.fc
226 +++ b/policy/modules/system/fstools.fc
227 @@ -1,7 +1,58 @@
228 -/usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
229 -/usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)
230 -/usr/bin/scsi_unique_id -- gen_context(system_u:object_r:fsadm_exec_t,s0)
231 -/usr/bin/syslinux -- gen_context(system_u:object_r:fsadm_exec_t,s0)
232 +/usr/bin/addpart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
233 +/usr/bin/badblocks -- gen_context(system_u:object_r:fsadm_exec_t,s0)
234 +/usr/bin/blkid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
235 +/usr/bin/blockdev -- gen_context(system_u:object_r:fsadm_exec_t,s0)
236 +/usr/bin/cfdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
237 +/usr/bin/clubufflush -- gen_context(system_u:object_r:fsadm_exec_t,s0)
238 +/usr/bin/delpart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
239 +/usr/bin/dosfsck -- gen_context(system_u:object_r:fsadm_exec_t,s0)
240 +/usr/bin/dump -- gen_context(system_u:object_r:fsadm_exec_t,s0)
241 +/usr/bin/dumpe2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
242 +/usr/bin/e2fsck -- gen_context(system_u:object_r:fsadm_exec_t,s0)
243 +/usr/bin/e4fsck -- gen_context(system_u:object_r:fsadm_exec_t,s0)
244 +/usr/bin/e2label -- gen_context(system_u:object_r:fsadm_exec_t,s0)
245 +/usr/bin/efibootmgr -- gen_context(system_u:object_r:fsadm_exec_t,s0)
246 +/usr/bin/fatsort -- gen_context(system_u:object_r:fsadm_exec_t,s0)
247 +/usr/bin/fdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
248 +/usr/bin/findfs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
249 +/usr/bin/fsck.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
250 +/usr/bin/gdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
251 +/usr/bin/hdparm -- gen_context(system_u:object_r:fsadm_exec_t,s0)
252 +/usr/bin/install-mbr -- gen_context(system_u:object_r:fsadm_exec_t,s0)
253 +/usr/bin/jfs_.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
254 +/usr/bin/losetup.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
255 +/usr/bin/lsraid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
256 +/usr/bin/make_reiser4 -- gen_context(system_u:object_r:fsadm_exec_t,s0)
257 +/usr/bin/mkdosfs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
258 +/usr/bin/mke2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
259 +/usr/bin/mke4fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
260 +/usr/bin/mkfs.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
261 +/usr/bin/mkraid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
262 +/usr/bin/mkreiserfs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
263 +/usr/bin/mkswap -- gen_context(system_u:object_r:fsadm_exec_t,s0)
264 +/usr/bin/parted -- gen_context(system_u:object_r:fsadm_exec_t,s0)
265 +/usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
266 +/usr/bin/partprobe -- gen_context(system_u:object_r:fsadm_exec_t,s0)
267 +/usr/bin/partx -- gen_context(system_u:object_r:fsadm_exec_t,s0)
268 +/usr/bin/raidautorun -- gen_context(system_u:object_r:fsadm_exec_t,s0)
269 +/usr/bin/raidstart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
270 +/usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)
271 +/usr/bin/reiserfs(ck|tune) -- gen_context(system_u:object_r:fsadm_exec_t,s0)
272 +/usr/bin/resize.*fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
273 +/usr/bin/scsi_info -- gen_context(system_u:object_r:fsadm_exec_t,s0)
274 +/usr/bin/scsi_unique_id -- gen_context(system_u:object_r:fsadm_exec_t,s0)
275 +/usr/bin/syslinux -- gen_context(system_u:object_r:fsadm_exec_t,s0)
276 +/usr/bin/sfdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
277 +/usr/bin/smartctl -- gen_context(system_u:object_r:fsadm_exec_t,s0)
278 +/usr/bin/swapoff -- gen_context(system_u:object_r:fsadm_exec_t,s0)
279 +/usr/bin/swapon.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
280 +/usr/bin/tune2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
281 +/usr/bin/zdb -- gen_context(system_u:object_r:fsadm_exec_t,s0)
282 +/usr/bin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0)
283 +/usr/bin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0)
284 +/usr/bin/zpios -- gen_context(system_u:object_r:fsadm_exec_t,s0)
285 +/usr/bin/zstreamdump -- gen_context(system_u:object_r:fsadm_exec_t,s0)
286 +/usr/bin/ztest -- gen_context(system_u:object_r:fsadm_exec_t,s0)
287
288 /usr/sbin/addpart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
289 /usr/sbin/badblocks -- gen_context(system_u:object_r:fsadm_exec_t,s0)
290
291 diff --git a/policy/modules/system/getty.fc b/policy/modules/system/getty.fc
292 index 90fa20f7..116ea642 100644
293 --- a/policy/modules/system/getty.fc
294 +++ b/policy/modules/system/getty.fc
295 @@ -3,6 +3,8 @@
296 /run/mgetty\.pid.* -- gen_context(system_u:object_r:getty_runtime_t,s0)
297 /run/agetty\.reload -- gen_context(system_u:object_r:getty_runtime_t,s0)
298
299 +/usr/bin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0)
300 +
301 /usr/sbin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0)
302
303 /var/log/mgetty\.log.* -- gen_context(system_u:object_r:getty_log_t,s0)
304
305 diff --git a/policy/modules/system/hotplug.fc b/policy/modules/system/hotplug.fc
306 index 05e1d78c..76a72119 100644
307 --- a/policy/modules/system/hotplug.fc
308 +++ b/policy/modules/system/hotplug.fc
309 @@ -7,5 +7,8 @@
310 /run/usb(/.*)? gen_context(system_u:object_r:hotplug_var_run_t,s0)
311 /run/hotplug(/.*)? gen_context(system_u:object_r:hotplug_var_run_t,s0)
312
313 +/usr/bin/hotplug -- gen_context(system_u:object_r:hotplug_exec_t,s0)
314 +/usr/bin/netplugd -- gen_context(system_u:object_r:hotplug_exec_t,s0)
315 +
316 /usr/sbin/hotplug -- gen_context(system_u:object_r:hotplug_exec_t,s0)
317 /usr/sbin/netplugd -- gen_context(system_u:object_r:hotplug_exec_t,s0)
318
319 diff --git a/policy/modules/system/init.fc b/policy/modules/system/init.fc
320 index 49c84772..0cc3cd8f 100644
321 --- a/policy/modules/system/init.fc
322 +++ b/policy/modules/system/init.fc
323 @@ -22,8 +22,11 @@ ifdef(`distro_gentoo',`
324 #
325 # /usr
326 #
327 +/usr/bin/init(ng)? -- gen_context(system_u:object_r:init_exec_t,s0)
328 +/usr/bin/open_init_pty -- gen_context(system_u:object_r:initrc_exec_t,s0)
329 /usr/bin/sepg_ctl -- gen_context(system_u:object_r:initrc_exec_t,s0)
330 /usr/bin/systemd -- gen_context(system_u:object_r:init_exec_t,s0)
331 +/usr/bin/upstart -- gen_context(system_u:object_r:init_exec_t,s0)
332
333 /usr/lib/systemd/systemd -- gen_context(system_u:object_r:init_exec_t,s0)
334 /usr/lib/systemd/system-preset(/.*)? gen_context(system_u:object_r:systemd_unit_t,s0)
335
336 diff --git a/policy/modules/system/ipsec.fc b/policy/modules/system/ipsec.fc
337 index a1fb3087..9ff125de 100644
338 --- a/policy/modules/system/ipsec.fc
339 +++ b/policy/modules/system/ipsec.fc
340 @@ -18,6 +18,11 @@
341 /etc/swanctl -d gen_context(system_u:object_r:ipsec_conf_file_t,s0)
342 /etc/swanctl/swanctl.conf -- gen_context(system_u:object_r:ipsec_conf_file_t,s0)
343
344 +/usr/bin/ipsec -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
345 +/usr/bin/racoon -- gen_context(system_u:object_r:racoon_exec_t,s0)
346 +/usr/bin/setkey -- gen_context(system_u:object_r:setkey_exec_t,s0)
347 +/usr/bin/swanctl -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
348 +
349 /usr/lib/ipsec/_plutoload -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
350 /usr/lib/ipsec/_plutorun -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
351 /usr/lib/ipsec/eroute -- gen_context(system_u:object_r:ipsec_exec_t,s0)
352
353 diff --git a/policy/modules/system/iptables.fc b/policy/modules/system/iptables.fc
354 index 01b404f7..7e71bdb4 100644
355 --- a/policy/modules/system/iptables.fc
356 +++ b/policy/modules/system/iptables.fc
357 @@ -4,6 +4,20 @@
358 /etc/sysconfig/ip6?tables.* -- gen_context(system_u:object_r:iptables_conf_t,s0)
359 /etc/sysconfig/system-config-firewall.* -- gen_context(system_u:object_r:iptables_conf_t,s0)
360
361 +/usr/bin/conntrack -- gen_context(system_u:object_r:iptables_exec_t,s0)
362 +/usr/bin/ebtables -- gen_context(system_u:object_r:iptables_exec_t,s0)
363 +/usr/bin/ebtables-restore -- gen_context(system_u:object_r:iptables_exec_t,s0)
364 +/usr/bin/ipchains.* -- gen_context(system_u:object_r:iptables_exec_t,s0)
365 +/usr/bin/ipset -- gen_context(system_u:object_r:iptables_exec_t,s0)
366 +/usr/bin/ip6?tables -- gen_context(system_u:object_r:iptables_exec_t,s0)
367 +/usr/bin/ip6?tables-multi -- gen_context(system_u:object_r:iptables_exec_t,s0)
368 +/usr/bin/ip6?tables-restore -- gen_context(system_u:object_r:iptables_exec_t,s0)
369 +/usr/bin/ipvsadm -- gen_context(system_u:object_r:iptables_exec_t,s0)
370 +/usr/bin/ipvsadm-restore -- gen_context(system_u:object_r:iptables_exec_t,s0)
371 +/usr/bin/ipvsadm-save -- gen_context(system_u:object_r:iptables_exec_t,s0)
372 +/usr/bin/nft -- gen_context(system_u:object_r:iptables_exec_t,s0)
373 +/usr/bin/xtables-multi -- gen_context(system_u:object_r:iptables_exec_t,s0)
374 +
375 /usr/lib/systemd/system/[^/]*arptables.* -- gen_context(system_u:object_r:iptables_unit_t,s0)
376 /usr/lib/systemd/system/[^/]*ebtables.* -- gen_context(system_u:object_r:iptables_unit_t,s0)
377 /usr/lib/systemd/system/[^/]*ip6tables.* -- gen_context(system_u:object_r:iptables_unit_t,s0)
378
379 diff --git a/policy/modules/system/libraries.fc b/policy/modules/system/libraries.fc
380 index f174ab68..1dfa5714 100644
381 --- a/policy/modules/system/libraries.fc
382 +++ b/policy/modules/system/libraries.fc
383 @@ -83,6 +83,8 @@ ifdef(`distro_redhat',`
384 #
385 # /usr
386 #
387 +/usr/bin/ldconfig -- gen_context(system_u:object_r:ldconfig_exec_t,s0)
388 +
389 /usr/lib gen_context(system_u:object_r:lib_t,s0)
390 /usr/lib/.* gen_context(system_u:object_r:lib_t,s0)
391
392
393 diff --git a/policy/modules/system/locallogin.fc b/policy/modules/system/locallogin.fc
394 index 755e304e..fc8d5850 100644
395 --- a/policy/modules/system/locallogin.fc
396 +++ b/policy/modules/system/locallogin.fc
397 @@ -1,2 +1,5 @@
398 +/usr/bin/sulogin -- gen_context(system_u:object_r:sulogin_exec_t,s0)
399 +/usr/bin/sushell -- gen_context(system_u:object_r:sulogin_exec_t,s0)
400 +
401 /usr/sbin/sulogin -- gen_context(system_u:object_r:sulogin_exec_t,s0)
402 /usr/sbin/sushell -- gen_context(system_u:object_r:sulogin_exec_t,s0)
403
404 diff --git a/policy/modules/system/logging.fc b/policy/modules/system/logging.fc
405 index 47249063..9174f94b 100644
406 --- a/policy/modules/system/logging.fc
407 +++ b/policy/modules/system/logging.fc
408 @@ -6,6 +6,18 @@
409 /etc/rc\.d/init\.d/auditd -- gen_context(system_u:object_r:auditd_initrc_exec_t,s0)
410 /etc/rc\.d/init\.d/rsyslog -- gen_context(system_u:object_r:syslogd_initrc_exec_t,s0)
411
412 +/usr/bin/audispd -- gen_context(system_u:object_r:audisp_exec_t,s0)
413 +/usr/bin/audisp-remote -- gen_context(system_u:object_r:audisp_remote_exec_t,s0)
414 +/usr/bin/auditctl -- gen_context(system_u:object_r:auditctl_exec_t,s0)
415 +/usr/bin/auditd -- gen_context(system_u:object_r:auditd_exec_t,s0)
416 +/usr/bin/klogd -- gen_context(system_u:object_r:klogd_exec_t,s0)
417 +/usr/bin/metalog -- gen_context(system_u:object_r:syslogd_exec_t,s0)
418 +/usr/bin/minilogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
419 +/usr/bin/rklogd -- gen_context(system_u:object_r:klogd_exec_t,s0)
420 +/usr/bin/rsyslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
421 +/usr/bin/syslog-ng -- gen_context(system_u:object_r:syslogd_exec_t,s0)
422 +/usr/bin/syslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
423 +
424 /usr/lib/systemd/system/auditd.* -- gen_context(system_u:object_r:auditd_unit_t,s0)
425 /usr/lib/systemd/system/[^/]*systemd-journal.* -- gen_context(system_u:object_r:syslogd_unit_t,s0)
426 /usr/lib/systemd/system/rsyslog.*\.service -- gen_context(system_u:object_r:syslogd_unit_t,s0)
427
428 diff --git a/policy/modules/system/lvm.fc b/policy/modules/system/lvm.fc
429 index 960da828..4ef5eaa4 100644
430 --- a/policy/modules/system/lvm.fc
431 +++ b/policy/modules/system/lvm.fc
432 @@ -23,9 +23,60 @@
433 #
434 # /usr
435 #
436 -ifdef(`distro_gentoo',`
437 +/usr/bin/clvmd -- gen_context(system_u:object_r:clvmd_exec_t,s0)
438 /usr/bin/cryptsetup -- gen_context(system_u:object_r:lvm_exec_t,s0)
439 -')
440 +/usr/bin/dmraid -- gen_context(system_u:object_r:lvm_exec_t,s0)
441 +/usr/bin/dmsetup -- gen_context(system_u:object_r:lvm_exec_t,s0)
442 +/usr/bin/dmsetup\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
443 +/usr/bin/e2fsadm -- gen_context(system_u:object_r:lvm_exec_t,s0)
444 +/usr/bin/lvchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
445 +/usr/bin/lvcreate -- gen_context(system_u:object_r:lvm_exec_t,s0)
446 +/usr/bin/lvdisplay -- gen_context(system_u:object_r:lvm_exec_t,s0)
447 +/usr/bin/lvextend -- gen_context(system_u:object_r:lvm_exec_t,s0)
448 +/usr/bin/lvm -- gen_context(system_u:object_r:lvm_exec_t,s0)
449 +/usr/bin/lvmetad -- gen_context(system_u:object_r:lvm_exec_t,s0)
450 +/usr/bin/lvm\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
451 +/usr/bin/lvmchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
452 +/usr/bin/lvmdiskscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
453 +/usr/bin/lvmiopversion -- gen_context(system_u:object_r:lvm_exec_t,s0)
454 +/usr/bin/lvmsadc -- gen_context(system_u:object_r:lvm_exec_t,s0)
455 +/usr/bin/lvmsar -- gen_context(system_u:object_r:lvm_exec_t,s0)
456 +/usr/bin/lvreduce -- gen_context(system_u:object_r:lvm_exec_t,s0)
457 +/usr/bin/lvremove -- gen_context(system_u:object_r:lvm_exec_t,s0)
458 +/usr/bin/lvrename -- gen_context(system_u:object_r:lvm_exec_t,s0)
459 +/usr/bin/lvresize -- gen_context(system_u:object_r:lvm_exec_t,s0)
460 +/usr/bin/lvs -- gen_context(system_u:object_r:lvm_exec_t,s0)
461 +/usr/bin/lvscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
462 +/usr/bin/multipathd -- gen_context(system_u:object_r:lvm_exec_t,s0)
463 +/usr/bin/multipath\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
464 +/usr/bin/pvchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
465 +/usr/bin/pvcreate -- gen_context(system_u:object_r:lvm_exec_t,s0)
466 +/usr/bin/pvdata -- gen_context(system_u:object_r:lvm_exec_t,s0)
467 +/usr/bin/pvdisplay -- gen_context(system_u:object_r:lvm_exec_t,s0)
468 +/usr/bin/pvmove -- gen_context(system_u:object_r:lvm_exec_t,s0)
469 +/usr/bin/pvremove -- gen_context(system_u:object_r:lvm_exec_t,s0)
470 +/usr/bin/pvs -- gen_context(system_u:object_r:lvm_exec_t,s0)
471 +/usr/bin/pvscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
472 +/usr/bin/vgcfgbackup -- gen_context(system_u:object_r:lvm_exec_t,s0)
473 +/usr/bin/vgcfgrestore -- gen_context(system_u:object_r:lvm_exec_t,s0)
474 +/usr/bin/vgchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
475 +/usr/bin/vgchange\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
476 +/usr/bin/vgck -- gen_context(system_u:object_r:lvm_exec_t,s0)
477 +/usr/bin/vgcreate -- gen_context(system_u:object_r:lvm_exec_t,s0)
478 +/usr/bin/vgdisplay -- gen_context(system_u:object_r:lvm_exec_t,s0)
479 +/usr/bin/vgexport -- gen_context(system_u:object_r:lvm_exec_t,s0)
480 +/usr/bin/vgextend -- gen_context(system_u:object_r:lvm_exec_t,s0)
481 +/usr/bin/vgimport -- gen_context(system_u:object_r:lvm_exec_t,s0)
482 +/usr/bin/vgmerge -- gen_context(system_u:object_r:lvm_exec_t,s0)
483 +/usr/bin/vgmknodes -- gen_context(system_u:object_r:lvm_exec_t,s0)
484 +/usr/bin/vgreduce -- gen_context(system_u:object_r:lvm_exec_t,s0)
485 +/usr/bin/vgremove -- gen_context(system_u:object_r:lvm_exec_t,s0)
486 +/usr/bin/vgrename -- gen_context(system_u:object_r:lvm_exec_t,s0)
487 +/usr/bin/vgs -- gen_context(system_u:object_r:lvm_exec_t,s0)
488 +/usr/bin/vgscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
489 +/usr/bin/vgscan\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
490 +/usr/bin/vgsplit -- gen_context(system_u:object_r:lvm_exec_t,s0)
491 +/usr/bin/vgwrapper -- gen_context(system_u:object_r:lvm_exec_t,s0)
492
493 /usr/lib/lvm-10/.* -- gen_context(system_u:object_r:lvm_exec_t,s0)
494 /usr/lib/lvm-200/.* -- gen_context(system_u:object_r:lvm_exec_t,s0)
495
496 diff --git a/policy/modules/system/modutils.fc b/policy/modules/system/modutils.fc
497 index bd241944..fd9ad36c 100644
498 --- a/policy/modules/system/modutils.fc
499 +++ b/policy/modules/system/modutils.fc
500 @@ -10,7 +10,14 @@ ifdef(`distro_gentoo',`
501
502 /run/tmpfiles\.d/kmod\.conf -- gen_context(system_u:object_r:kmod_tmpfiles_conf_t,s0)
503
504 +/usr/bin/depmod.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
505 +/usr/bin/generate-modprobe\.conf -- gen_context(system_u:object_r:kmod_exec_t,s0)
506 +/usr/bin/insmod.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
507 /usr/bin/kmod -- gen_context(system_u:object_r:kmod_exec_t,s0)
508 +/usr/bin/modprobe.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
509 +/usr/bin/modules-update -- gen_context(system_u:object_r:kmod_exec_t,s0)
510 +/usr/bin/rmmod.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
511 +/usr/bin/update-modules -- gen_context(system_u:object_r:kmod_exec_t,s0)
512
513 /usr/lib/modules(/.*)? gen_context(system_u:object_r:modules_object_t,s0)
514 /usr/lib/modules/[^/]+/modules\..+ -- gen_context(system_u:object_r:modules_dep_t,s0)
515
516 diff --git a/policy/modules/system/mount.fc b/policy/modules/system/mount.fc
517 index 97e2596b..7352406c 100644
518 --- a/policy/modules/system/mount.fc
519 +++ b/policy/modules/system/mount.fc
520 @@ -1,6 +1,8 @@
521 /usr/bin/fusermount -- gen_context(system_u:object_r:mount_exec_t,s0)
522 /usr/bin/mount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
523 /usr/bin/umount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
524 +/usr/bin/zfs -- gen_context(system_u:object_r:mount_exec_t,s0)
525 +/usr/bin/zpool -- gen_context(system_u:object_r:mount_exec_t,s0)
526
527 /usr/sbin/mount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
528 /usr/sbin/umount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
529
530 diff --git a/policy/modules/system/netlabel.fc b/policy/modules/system/netlabel.fc
531 index f44bf7a2..691bec7e 100644
532 --- a/policy/modules/system/netlabel.fc
533 +++ b/policy/modules/system/netlabel.fc
534 @@ -1 +1,3 @@
535 +/usr/bin/netlabelctl -- gen_context(system_u:object_r:netlabel_mgmt_exec_t,s0)
536 +
537 /usr/sbin/netlabelctl -- gen_context(system_u:object_r:netlabel_mgmt_exec_t,s0)
538
539 diff --git a/policy/modules/system/selinuxutil.fc b/policy/modules/system/selinuxutil.fc
540 index f7b84401..632628c8 100644
541 --- a/policy/modules/system/selinuxutil.fc
542 +++ b/policy/modules/system/selinuxutil.fc
543 @@ -28,7 +28,15 @@
544 # /usr
545 #
546 /usr/bin/checkpolicy -- gen_context(system_u:object_r:checkpolicy_exec_t,s0)
547 +/usr/bin/load_policy -- gen_context(system_u:object_r:load_policy_exec_t,s0)
548 /usr/bin/newrole -- gen_context(system_u:object_r:newrole_exec_t,s0)
549 +/usr/bin/restorecon -- gen_context(system_u:object_r:setfiles_exec_t,s0)
550 +/usr/bin/restorecond -- gen_context(system_u:object_r:restorecond_exec_t,s0)
551 +/usr/bin/run_init -- gen_context(system_u:object_r:run_init_exec_t,s0)
552 +/usr/bin/setfiles.* -- gen_context(system_u:object_r:setfiles_exec_t,s0)
553 +/usr/bin/setsebool -- gen_context(system_u:object_r:semanage_exec_t,s0)
554 +/usr/bin/semanage -- gen_context(system_u:object_r:semanage_exec_t,s0)
555 +/usr/bin/semodule -- gen_context(system_u:object_r:semanage_exec_t,s0)
556
557 /usr/lib/systemd/system/restorecond.*\.service -- gen_context(system_u:object_r:restorecond_unit_t,s0)
558
559
560 diff --git a/policy/modules/system/setrans.fc b/policy/modules/system/setrans.fc
561 index 6e60bbe7..00772065 100644
562 --- a/policy/modules/system/setrans.fc
563 +++ b/policy/modules/system/setrans.fc
564 @@ -2,6 +2,8 @@
565
566 /run/setrans(/.*)? gen_context(system_u:object_r:setrans_var_run_t,mls_systemhigh)
567
568 +/usr/bin/mcstransd -- gen_context(system_u:object_r:setrans_exec_t,s0)
569 +
570 /usr/lib/systemd/system/mcstrans.*\.service -- gen_context(system_u:object_r:setrans_unit_t,s0)
571
572 /usr/sbin/mcstransd -- gen_context(system_u:object_r:setrans_exec_t,s0)
573
574 diff --git a/policy/modules/system/sysnetwork.fc b/policy/modules/system/sysnetwork.fc
575 index 154ecd01..c71281bd 100644
576 --- a/policy/modules/system/sysnetwork.fc
577 +++ b/policy/modules/system/sysnetwork.fc
578 @@ -33,8 +33,21 @@ ifdef(`distro_redhat',`
579 #
580 # /usr
581 #
582 -/usr/bin/ifconfig -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
583 -/usr/bin/ip -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
584 +/usr/bin/dhclient.* -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
585 +/usr/bin/dhcdbd -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
586 +/usr/bin/dhcp6c -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
587 +/usr/bin/dhcpcd -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
588 +/usr/bin/ethtool -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
589 +/usr/bin/ifconfig -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
590 +/usr/bin/ip -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
591 +/usr/bin/ipx_configure -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
592 +/usr/bin/ipx_interface -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
593 +/usr/bin/ipx_internal_net -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
594 +/usr/bin/iw -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
595 +/usr/bin/iwconfig -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
596 +/usr/bin/mii-tool -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
597 +/usr/bin/pump -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
598 +/usr/bin/tc -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
599
600 /usr/sbin/dhclient.* -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
601 /usr/sbin/dhcdbd -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
602
603 diff --git a/policy/modules/system/udev.fc b/policy/modules/system/udev.fc
604 index 0e433bed..68c047c1 100644
605 --- a/policy/modules/system/udev.fc
606 +++ b/policy/modules/system/udev.fc
607 @@ -9,11 +9,13 @@
608 /etc/udev/rules.d(/.*)? gen_context(system_u:object_r:udev_rules_t,s0)
609 /etc/udev/scripts/.+ -- gen_context(system_u:object_r:udev_helper_exec_t,s0)
610
611 -/usr/bin/udevinfo -- gen_context(system_u:object_r:udev_exec_t,s0)
612 -
613 -ifdef(`distro_debian',`
614 +/usr/bin/udev -- gen_context(system_u:object_r:udev_exec_t,s0)
615 /usr/bin/udevadm -- gen_context(system_u:object_r:udev_exec_t,s0)
616 -')
617 +/usr/bin/udevd -- gen_context(system_u:object_r:udev_exec_t,s0)
618 +/usr/bin/udevinfo -- gen_context(system_u:object_r:udev_exec_t,s0)
619 +/usr/bin/udevsend -- gen_context(system_u:object_r:udev_exec_t,s0)
620 +/usr/bin/udevstart -- gen_context(system_u:object_r:udev_exec_t,s0)
621 +/usr/bin/wait_for_sysfs -- gen_context(system_u:object_r:udev_exec_t,s0)
622
623 ifdef(`distro_debian',`
624 /usr/lib/udev/create_static_nodes -- gen_context(system_u:object_r:udev_exec_t,s0)