aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Iooss <nicolas.iooss@m4x.org>2017-04-15 20:49:07 +0200
committerJason Zaman <jason@perfinion.com>2017-05-07 23:53:18 +0800
commitad561b6028cb137e4169876737059997eec4b2ee (patch)
tree5f9f70c11cf715605fbf9560cc39a538e86003b0
parentSynchronize file patterns for /usr/bin/mount... and /usr/sbin/mount... (diff)
downloadhardened-refpolicy-ad561b6028cb137e4169876737059997eec4b2ee.tar.gz
hardened-refpolicy-ad561b6028cb137e4169876737059997eec4b2ee.tar.bz2
hardened-refpolicy-ad561b6028cb137e4169876737059997eec4b2ee.zip
Support systems with a single /usr/bin directory
On systems such as Arch Linux, all programs which are usually located in /bin, /sbin, /usr/bin and /usr/sbin are present in /usr/bin and the other locations are symbolic links to this directory. With such a configuration, the file contexts which define types for files in /bin, /sbin and /usr/sbin need to be duplicated to provide definitions for /usr/bin/... As the "/bin vs. /usr/bin" part of the needed definitions has already been done with the "usr merge" patches, the next step consists in duplicating file contexts for /usr/sbin. This is what this patch does for all modules which are not in contrib. This is the second iteration of an idea I have previously posted on http://oss.tresys.com/pipermail/refpolicy/2017-March/009176.html
-rw-r--r--policy/modules/admin/bootloader.fc8
-rw-r--r--policy/modules/admin/consoletype.fc2
-rw-r--r--policy/modules/admin/netutils.fc5
-rw-r--r--policy/modules/admin/usermanage.fc12
-rw-r--r--policy/modules/apps/seunshare.fc2
-rw-r--r--policy/modules/kernel/corecommands.fc6
-rw-r--r--policy/modules/services/ssh.fc1
-rw-r--r--policy/modules/services/xserver.fc1
-rw-r--r--policy/modules/system/authlogin.fc9
-rw-r--r--policy/modules/system/clock.fc2
-rw-r--r--policy/modules/system/fstools.fc59
-rw-r--r--policy/modules/system/getty.fc2
-rw-r--r--policy/modules/system/hotplug.fc3
-rw-r--r--policy/modules/system/init.fc3
-rw-r--r--policy/modules/system/ipsec.fc5
-rw-r--r--policy/modules/system/iptables.fc14
-rw-r--r--policy/modules/system/libraries.fc2
-rw-r--r--policy/modules/system/locallogin.fc3
-rw-r--r--policy/modules/system/logging.fc12
-rw-r--r--policy/modules/system/lvm.fc55
-rw-r--r--policy/modules/system/modutils.fc7
-rw-r--r--policy/modules/system/mount.fc2
-rw-r--r--policy/modules/system/netlabel.fc2
-rw-r--r--policy/modules/system/selinuxutil.fc8
-rw-r--r--policy/modules/system/setrans.fc2
-rw-r--r--policy/modules/system/sysnetwork.fc17
-rw-r--r--policy/modules/system/udev.fc10
27 files changed, 241 insertions, 13 deletions
diff --git a/policy/modules/admin/bootloader.fc b/policy/modules/admin/bootloader.fc
index c3e8341f..f21a5e49 100644
--- a/policy/modules/admin/bootloader.fc
+++ b/policy/modules/admin/bootloader.fc
@@ -2,6 +2,14 @@
/etc/lilo\.conf.* -- gen_context(system_u:object_r:bootloader_etc_t,s0)
/etc/yaboot\.conf.* -- gen_context(system_u:object_r:bootloader_etc_t,s0)
+/usr/bin/grub -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/bin/grub2?-bios-setup -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/bin/grub2?-install -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/bin/grub2?-mkconfig -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/bin/grub2?-probe -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/bin/lilo.* -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+/usr/bin/ybin.* -- gen_context(system_u:object_r:bootloader_exec_t,s0)
+
/usr/sbin/grub -- gen_context(system_u:object_r:bootloader_exec_t,s0)
/usr/sbin/grub2?-bios-setup -- gen_context(system_u:object_r:bootloader_exec_t,s0)
/usr/sbin/grub2?-install -- gen_context(system_u:object_r:bootloader_exec_t,s0)
diff --git a/policy/modules/admin/consoletype.fc b/policy/modules/admin/consoletype.fc
index c5190eef..4e07dca2 100644
--- a/policy/modules/admin/consoletype.fc
+++ b/policy/modules/admin/consoletype.fc
@@ -1 +1,3 @@
+/usr/bin/consoletype -- gen_context(system_u:object_r:consoletype_exec_t,s0)
+
/usr/sbin/consoletype -- gen_context(system_u:object_r:consoletype_exec_t,s0)
diff --git a/policy/modules/admin/netutils.fc b/policy/modules/admin/netutils.fc
index 5041c105..4f77e1cc 100644
--- a/policy/modules/admin/netutils.fc
+++ b/policy/modules/admin/netutils.fc
@@ -1,7 +1,12 @@
/usr/bin/arping -- gen_context(system_u:object_r:netutils_exec_t,s0)
+/usr/bin/fping -- gen_context(system_u:object_r:ping_exec_t,s0)
+/usr/bin/hping2 -- gen_context(system_u:object_r:ping_exec_t,s0)
+/usr/bin/iptstate -- gen_context(system_u:object_r:netutils_exec_t,s0)
/usr/bin/lft -- gen_context(system_u:object_r:traceroute_exec_t,s0)
/usr/bin/nmap -- gen_context(system_u:object_r:traceroute_exec_t,s0)
/usr/bin/ping.* -- gen_context(system_u:object_r:ping_exec_t,s0)
+/usr/bin/send_arp -- gen_context(system_u:object_r:ping_exec_t,s0)
+/usr/bin/tcpdump -- gen_context(system_u:object_r:netutils_exec_t,s0)
/usr/bin/tracepath.* -- gen_context(system_u:object_r:traceroute_exec_t,s0)
/usr/bin/traceroute.* -- gen_context(system_u:object_r:traceroute_exec_t,s0)
diff --git a/policy/modules/admin/usermanage.fc b/policy/modules/admin/usermanage.fc
index 0e00005a..620eefc6 100644
--- a/policy/modules/admin/usermanage.fc
+++ b/policy/modules/admin/usermanage.fc
@@ -5,8 +5,20 @@ ifdef(`distro_debian',`
/usr/bin/chage -- gen_context(system_u:object_r:passwd_exec_t,s0)
/usr/bin/chfn -- gen_context(system_u:object_r:chfn_exec_t,s0)
/usr/bin/chsh -- gen_context(system_u:object_r:chfn_exec_t,s0)
+/usr/bin/crack_[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0)
+/usr/bin/cracklib-[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0)
/usr/bin/gpasswd -- gen_context(system_u:object_r:groupadd_exec_t,s0)
+/usr/bin/groupadd -- gen_context(system_u:object_r:groupadd_exec_t,s0)
+/usr/bin/groupdel -- gen_context(system_u:object_r:groupadd_exec_t,s0)
+/usr/bin/groupmod -- gen_context(system_u:object_r:groupadd_exec_t,s0)
+/usr/bin/grpconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
+/usr/bin/grpunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
/usr/bin/passwd -- gen_context(system_u:object_r:passwd_exec_t,s0)
+/usr/bin/pwconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
+/usr/bin/pwunconv -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
+/usr/bin/useradd -- gen_context(system_u:object_r:useradd_exec_t,s0)
+/usr/bin/userdel -- gen_context(system_u:object_r:useradd_exec_t,s0)
+/usr/bin/usermod -- gen_context(system_u:object_r:useradd_exec_t,s0)
/usr/bin/vigr -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
/usr/bin/vipw -- gen_context(system_u:object_r:admin_passwd_exec_t,s0)
diff --git a/policy/modules/apps/seunshare.fc b/policy/modules/apps/seunshare.fc
index 30a4b9fd..3899b4c1 100644
--- a/policy/modules/apps/seunshare.fc
+++ b/policy/modules/apps/seunshare.fc
@@ -1 +1,3 @@
+/usr/bin/seunshare -- gen_context(system_u:object_r:seunshare_exec_t,s0)
+
/usr/sbin/seunshare -- gen_context(system_u:object_r:seunshare_exec_t,s0)
diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc
index 4b395d99..fe1a5e13 100644
--- a/policy/modules/kernel/corecommands.fc
+++ b/policy/modules/kernel/corecommands.fc
@@ -143,11 +143,17 @@ ifdef(`distro_gentoo',`
/usr/bin/bash2 -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/fish -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/git-shell -- gen_context(system_u:object_r:shell_exec_t,s0)
+/usr/bin/insmod_ksymoops_clean -- gen_context(system_u:object_r:bin_t,s0)
/usr/bin/ksh.* -- gen_context(system_u:object_r:shell_exec_t,s0)
+/usr/bin/mkfs\.cramfs -- gen_context(system_u:object_r:bin_t,s0)
/usr/bin/mksh -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/mountpoint -- gen_context(system_u:object_r:bin_t,s0)
+/usr/bin/nologin -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/sash -- gen_context(system_u:object_r:shell_exec_t,s0)
+/usr/bin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/scponly -- gen_context(system_u:object_r:shell_exec_t,s0)
+/usr/bin/scponlyc -- gen_context(system_u:object_r:shell_exec_t,s0)
+/usr/bin/smrsh -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/tcsh -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/yash -- gen_context(system_u:object_r:shell_exec_t,s0)
/usr/bin/zsh.* -- gen_context(system_u:object_r:shell_exec_t,s0)
diff --git a/policy/modules/services/ssh.fc b/policy/modules/services/ssh.fc
index 71fd227a..4ac3e733 100644
--- a/policy/modules/services/ssh.fc
+++ b/policy/modules/services/ssh.fc
@@ -6,6 +6,7 @@ HOME_DIR/\.ssh(/.*)? gen_context(system_u:object_r:ssh_home_t,s0)
/usr/bin/ssh -- gen_context(system_u:object_r:ssh_exec_t,s0)
/usr/bin/ssh-agent -- gen_context(system_u:object_r:ssh_agent_exec_t,s0)
/usr/bin/ssh-keygen -- gen_context(system_u:object_r:ssh_keygen_exec_t,s0)
+/usr/bin/sshd -- gen_context(system_u:object_r:sshd_exec_t,s0)
/usr/lib/openssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0)
/usr/lib/ssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0)
diff --git a/policy/modules/services/xserver.fc b/policy/modules/services/xserver.fc
index 201d28fa..f0392c94 100644
--- a/policy/modules/services/xserver.fc
+++ b/policy/modules/services/xserver.fc
@@ -70,6 +70,7 @@ HOME_DIR/\.Xauthority.* -- gen_context(system_u:object_r:xauth_home_t,s0)
/usr/bin/sddm -- gen_context(system_u:object_r:xdm_exec_t,s0)
/usr/bin/gpe-dm -- gen_context(system_u:object_r:xdm_exec_t,s0)
/usr/bin/iceauth -- gen_context(system_u:object_r:iceauth_exec_t,s0)
+/usr/bin/lightdm -- gen_context(system_u:object_r:xdm_exec_t,s0)
/usr/bin/slim -- gen_context(system_u:object_r:xdm_exec_t,s0)
/usr/bin/Xair -- gen_context(system_u:object_r:xserver_exec_t,s0)
/usr/bin/xauth -- gen_context(system_u:object_r:xauth_exec_t,s0)
diff --git a/policy/modules/system/authlogin.fc b/policy/modules/system/authlogin.fc
index d68f6bb9..68f61737 100644
--- a/policy/modules/system/authlogin.fc
+++ b/policy/modules/system/authlogin.fc
@@ -5,13 +5,20 @@
/etc/shadow.* -- gen_context(system_u:object_r:shadow_t,s0)
/usr/bin/login -- gen_context(system_u:object_r:login_exec_t,s0)
+/usr/bin/pam_console_apply -- gen_context(system_u:object_r:pam_console_exec_t,s0)
+/usr/bin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
+/usr/bin/unix_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
+/usr/bin/unix_update -- gen_context(system_u:object_r:updpwd_exec_t,s0)
+/usr/bin/unix_verify -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
+/usr/bin/utempter -- gen_context(system_u:object_r:utempter_exec_t,s0)
+/usr/bin/validate -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
/usr/kerberos/sbin/login\.krb5 -- gen_context(system_u:object_r:login_exec_t,s0)
/usr/lib/utempter/utempter -- gen_context(system_u:object_r:utempter_exec_t,s0)
/usr/sbin/pam_console_apply -- gen_context(system_u:object_r:pam_console_exec_t,s0)
-/usr/sbin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
+/usr/sbin/pam_timestamp_check -- gen_context(system_u:object_r:pam_exec_t,s0)
/usr/sbin/unix_chkpwd -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
/usr/sbin/unix_update -- gen_context(system_u:object_r:updpwd_exec_t,s0)
/usr/sbin/unix_verify -- gen_context(system_u:object_r:chkpwd_exec_t,s0)
diff --git a/policy/modules/system/clock.fc b/policy/modules/system/clock.fc
index 61e6fe5d..30196589 100644
--- a/policy/modules/system/clock.fc
+++ b/policy/modules/system/clock.fc
@@ -1,3 +1,5 @@
/etc/adjtime -- gen_context(system_u:object_r:adjtime_t,s0)
+/usr/bin/hwclock -- gen_context(system_u:object_r:hwclock_exec_t,s0)
+
/usr/sbin/hwclock -- gen_context(system_u:object_r:hwclock_exec_t,s0)
diff --git a/policy/modules/system/fstools.fc b/policy/modules/system/fstools.fc
index 4dca3edf..71dad308 100644
--- a/policy/modules/system/fstools.fc
+++ b/policy/modules/system/fstools.fc
@@ -1,7 +1,58 @@
-/usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
-/usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)
-/usr/bin/scsi_unique_id -- gen_context(system_u:object_r:fsadm_exec_t,s0)
-/usr/bin/syslinux -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/addpart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/badblocks -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/blkid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/blockdev -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/cfdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/clubufflush -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/delpart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/dosfsck -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/dump -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/dumpe2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/e2fsck -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/e4fsck -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/e2label -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/efibootmgr -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/fatsort -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/fdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/findfs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/fsck.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/gdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/hdparm -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/install-mbr -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/jfs_.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/losetup.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/lsraid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/make_reiser4 -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mkdosfs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mke2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mke4fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mkfs.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mkraid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mkreiserfs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/mkswap -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/parted -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/partition_uuid -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/partprobe -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/partx -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/raidautorun -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/raidstart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/raw -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/reiserfs(ck|tune) -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/resize.*fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/scsi_info -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/scsi_unique_id -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/syslinux -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/sfdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/smartctl -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/swapoff -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/swapon.* -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/tune2fs -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/zdb -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/zhack -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/zinject -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/zpios -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/zstreamdump -- gen_context(system_u:object_r:fsadm_exec_t,s0)
+/usr/bin/ztest -- gen_context(system_u:object_r:fsadm_exec_t,s0)
/usr/sbin/addpart -- gen_context(system_u:object_r:fsadm_exec_t,s0)
/usr/sbin/badblocks -- gen_context(system_u:object_r:fsadm_exec_t,s0)
diff --git a/policy/modules/system/getty.fc b/policy/modules/system/getty.fc
index 90fa20f7..116ea642 100644
--- a/policy/modules/system/getty.fc
+++ b/policy/modules/system/getty.fc
@@ -3,6 +3,8 @@
/run/mgetty\.pid.* -- gen_context(system_u:object_r:getty_runtime_t,s0)
/run/agetty\.reload -- gen_context(system_u:object_r:getty_runtime_t,s0)
+/usr/bin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0)
+
/usr/sbin/.*getty -- gen_context(system_u:object_r:getty_exec_t,s0)
/var/log/mgetty\.log.* -- gen_context(system_u:object_r:getty_log_t,s0)
diff --git a/policy/modules/system/hotplug.fc b/policy/modules/system/hotplug.fc
index 05e1d78c..76a72119 100644
--- a/policy/modules/system/hotplug.fc
+++ b/policy/modules/system/hotplug.fc
@@ -7,5 +7,8 @@
/run/usb(/.*)? gen_context(system_u:object_r:hotplug_var_run_t,s0)
/run/hotplug(/.*)? gen_context(system_u:object_r:hotplug_var_run_t,s0)
+/usr/bin/hotplug -- gen_context(system_u:object_r:hotplug_exec_t,s0)
+/usr/bin/netplugd -- gen_context(system_u:object_r:hotplug_exec_t,s0)
+
/usr/sbin/hotplug -- gen_context(system_u:object_r:hotplug_exec_t,s0)
/usr/sbin/netplugd -- gen_context(system_u:object_r:hotplug_exec_t,s0)
diff --git a/policy/modules/system/init.fc b/policy/modules/system/init.fc
index 49c84772..0cc3cd8f 100644
--- a/policy/modules/system/init.fc
+++ b/policy/modules/system/init.fc
@@ -22,8 +22,11 @@ ifdef(`distro_gentoo',`
#
# /usr
#
+/usr/bin/init(ng)? -- gen_context(system_u:object_r:init_exec_t,s0)
+/usr/bin/open_init_pty -- gen_context(system_u:object_r:initrc_exec_t,s0)
/usr/bin/sepg_ctl -- gen_context(system_u:object_r:initrc_exec_t,s0)
/usr/bin/systemd -- gen_context(system_u:object_r:init_exec_t,s0)
+/usr/bin/upstart -- gen_context(system_u:object_r:init_exec_t,s0)
/usr/lib/systemd/systemd -- gen_context(system_u:object_r:init_exec_t,s0)
/usr/lib/systemd/system-preset(/.*)? gen_context(system_u:object_r:systemd_unit_t,s0)
diff --git a/policy/modules/system/ipsec.fc b/policy/modules/system/ipsec.fc
index a1fb3087..9ff125de 100644
--- a/policy/modules/system/ipsec.fc
+++ b/policy/modules/system/ipsec.fc
@@ -18,6 +18,11 @@
/etc/swanctl -d gen_context(system_u:object_r:ipsec_conf_file_t,s0)
/etc/swanctl/swanctl.conf -- gen_context(system_u:object_r:ipsec_conf_file_t,s0)
+/usr/bin/ipsec -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
+/usr/bin/racoon -- gen_context(system_u:object_r:racoon_exec_t,s0)
+/usr/bin/setkey -- gen_context(system_u:object_r:setkey_exec_t,s0)
+/usr/bin/swanctl -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
+
/usr/lib/ipsec/_plutoload -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
/usr/lib/ipsec/_plutorun -- gen_context(system_u:object_r:ipsec_mgmt_exec_t,s0)
/usr/lib/ipsec/eroute -- gen_context(system_u:object_r:ipsec_exec_t,s0)
diff --git a/policy/modules/system/iptables.fc b/policy/modules/system/iptables.fc
index 01b404f7..7e71bdb4 100644
--- a/policy/modules/system/iptables.fc
+++ b/policy/modules/system/iptables.fc
@@ -4,6 +4,20 @@
/etc/sysconfig/ip6?tables.* -- gen_context(system_u:object_r:iptables_conf_t,s0)
/etc/sysconfig/system-config-firewall.* -- gen_context(system_u:object_r:iptables_conf_t,s0)
+/usr/bin/conntrack -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ebtables -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ebtables-restore -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ipchains.* -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ipset -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ip6?tables -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ip6?tables-multi -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ip6?tables-restore -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ipvsadm -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ipvsadm-restore -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/ipvsadm-save -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/nft -- gen_context(system_u:object_r:iptables_exec_t,s0)
+/usr/bin/xtables-multi -- gen_context(system_u:object_r:iptables_exec_t,s0)
+
/usr/lib/systemd/system/[^/]*arptables.* -- gen_context(system_u:object_r:iptables_unit_t,s0)
/usr/lib/systemd/system/[^/]*ebtables.* -- gen_context(system_u:object_r:iptables_unit_t,s0)
/usr/lib/systemd/system/[^/]*ip6tables.* -- gen_context(system_u:object_r:iptables_unit_t,s0)
diff --git a/policy/modules/system/libraries.fc b/policy/modules/system/libraries.fc
index f174ab68..1dfa5714 100644
--- a/policy/modules/system/libraries.fc
+++ b/policy/modules/system/libraries.fc
@@ -83,6 +83,8 @@ ifdef(`distro_redhat',`
#
# /usr
#
+/usr/bin/ldconfig -- gen_context(system_u:object_r:ldconfig_exec_t,s0)
+
/usr/lib gen_context(system_u:object_r:lib_t,s0)
/usr/lib/.* gen_context(system_u:object_r:lib_t,s0)
diff --git a/policy/modules/system/locallogin.fc b/policy/modules/system/locallogin.fc
index 755e304e..fc8d5850 100644
--- a/policy/modules/system/locallogin.fc
+++ b/policy/modules/system/locallogin.fc
@@ -1,2 +1,5 @@
+/usr/bin/sulogin -- gen_context(system_u:object_r:sulogin_exec_t,s0)
+/usr/bin/sushell -- gen_context(system_u:object_r:sulogin_exec_t,s0)
+
/usr/sbin/sulogin -- gen_context(system_u:object_r:sulogin_exec_t,s0)
/usr/sbin/sushell -- gen_context(system_u:object_r:sulogin_exec_t,s0)
diff --git a/policy/modules/system/logging.fc b/policy/modules/system/logging.fc
index 47249063..9174f94b 100644
--- a/policy/modules/system/logging.fc
+++ b/policy/modules/system/logging.fc
@@ -6,6 +6,18 @@
/etc/rc\.d/init\.d/auditd -- gen_context(system_u:object_r:auditd_initrc_exec_t,s0)
/etc/rc\.d/init\.d/rsyslog -- gen_context(system_u:object_r:syslogd_initrc_exec_t,s0)
+/usr/bin/audispd -- gen_context(system_u:object_r:audisp_exec_t,s0)
+/usr/bin/audisp-remote -- gen_context(system_u:object_r:audisp_remote_exec_t,s0)
+/usr/bin/auditctl -- gen_context(system_u:object_r:auditctl_exec_t,s0)
+/usr/bin/auditd -- gen_context(system_u:object_r:auditd_exec_t,s0)
+/usr/bin/klogd -- gen_context(system_u:object_r:klogd_exec_t,s0)
+/usr/bin/metalog -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+/usr/bin/minilogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+/usr/bin/rklogd -- gen_context(system_u:object_r:klogd_exec_t,s0)
+/usr/bin/rsyslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+/usr/bin/syslog-ng -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+/usr/bin/syslogd -- gen_context(system_u:object_r:syslogd_exec_t,s0)
+
/usr/lib/systemd/system/auditd.* -- gen_context(system_u:object_r:auditd_unit_t,s0)
/usr/lib/systemd/system/[^/]*systemd-journal.* -- gen_context(system_u:object_r:syslogd_unit_t,s0)
/usr/lib/systemd/system/rsyslog.*\.service -- gen_context(system_u:object_r:syslogd_unit_t,s0)
diff --git a/policy/modules/system/lvm.fc b/policy/modules/system/lvm.fc
index 960da828..4ef5eaa4 100644
--- a/policy/modules/system/lvm.fc
+++ b/policy/modules/system/lvm.fc
@@ -23,9 +23,60 @@
#
# /usr
#
-ifdef(`distro_gentoo',`
+/usr/bin/clvmd -- gen_context(system_u:object_r:clvmd_exec_t,s0)
/usr/bin/cryptsetup -- gen_context(system_u:object_r:lvm_exec_t,s0)
-')
+/usr/bin/dmraid -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/dmsetup -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/dmsetup\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/e2fsadm -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvcreate -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvdisplay -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvextend -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvm -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvmetad -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvm\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvmchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvmdiskscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvmiopversion -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvmsadc -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvmsar -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvreduce -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvremove -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvrename -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvresize -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvs -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/lvscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/multipathd -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/multipath\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvcreate -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvdata -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvdisplay -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvmove -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvremove -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvs -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/pvscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgcfgbackup -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgcfgrestore -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgchange -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgchange\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgck -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgcreate -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgdisplay -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgexport -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgextend -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgimport -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgmerge -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgmknodes -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgreduce -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgremove -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgrename -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgs -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgscan -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgscan\.static -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgsplit -- gen_context(system_u:object_r:lvm_exec_t,s0)
+/usr/bin/vgwrapper -- gen_context(system_u:object_r:lvm_exec_t,s0)
/usr/lib/lvm-10/.* -- gen_context(system_u:object_r:lvm_exec_t,s0)
/usr/lib/lvm-200/.* -- gen_context(system_u:object_r:lvm_exec_t,s0)
diff --git a/policy/modules/system/modutils.fc b/policy/modules/system/modutils.fc
index bd241944..fd9ad36c 100644
--- a/policy/modules/system/modutils.fc
+++ b/policy/modules/system/modutils.fc
@@ -10,7 +10,14 @@ ifdef(`distro_gentoo',`
/run/tmpfiles\.d/kmod\.conf -- gen_context(system_u:object_r:kmod_tmpfiles_conf_t,s0)
+/usr/bin/depmod.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
+/usr/bin/generate-modprobe\.conf -- gen_context(system_u:object_r:kmod_exec_t,s0)
+/usr/bin/insmod.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
/usr/bin/kmod -- gen_context(system_u:object_r:kmod_exec_t,s0)
+/usr/bin/modprobe.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
+/usr/bin/modules-update -- gen_context(system_u:object_r:kmod_exec_t,s0)
+/usr/bin/rmmod.* -- gen_context(system_u:object_r:kmod_exec_t,s0)
+/usr/bin/update-modules -- gen_context(system_u:object_r:kmod_exec_t,s0)
/usr/lib/modules(/.*)? gen_context(system_u:object_r:modules_object_t,s0)
/usr/lib/modules/[^/]+/modules\..+ -- gen_context(system_u:object_r:modules_dep_t,s0)
diff --git a/policy/modules/system/mount.fc b/policy/modules/system/mount.fc
index 97e2596b..7352406c 100644
--- a/policy/modules/system/mount.fc
+++ b/policy/modules/system/mount.fc
@@ -1,6 +1,8 @@
/usr/bin/fusermount -- gen_context(system_u:object_r:mount_exec_t,s0)
/usr/bin/mount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
/usr/bin/umount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
+/usr/bin/zfs -- gen_context(system_u:object_r:mount_exec_t,s0)
+/usr/bin/zpool -- gen_context(system_u:object_r:mount_exec_t,s0)
/usr/sbin/mount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
/usr/sbin/umount(\.[^/]+)? -- gen_context(system_u:object_r:mount_exec_t,s0)
diff --git a/policy/modules/system/netlabel.fc b/policy/modules/system/netlabel.fc
index f44bf7a2..691bec7e 100644
--- a/policy/modules/system/netlabel.fc
+++ b/policy/modules/system/netlabel.fc
@@ -1 +1,3 @@
+/usr/bin/netlabelctl -- gen_context(system_u:object_r:netlabel_mgmt_exec_t,s0)
+
/usr/sbin/netlabelctl -- gen_context(system_u:object_r:netlabel_mgmt_exec_t,s0)
diff --git a/policy/modules/system/selinuxutil.fc b/policy/modules/system/selinuxutil.fc
index f7b84401..632628c8 100644
--- a/policy/modules/system/selinuxutil.fc
+++ b/policy/modules/system/selinuxutil.fc
@@ -28,7 +28,15 @@
# /usr
#
/usr/bin/checkpolicy -- gen_context(system_u:object_r:checkpolicy_exec_t,s0)
+/usr/bin/load_policy -- gen_context(system_u:object_r:load_policy_exec_t,s0)
/usr/bin/newrole -- gen_context(system_u:object_r:newrole_exec_t,s0)
+/usr/bin/restorecon -- gen_context(system_u:object_r:setfiles_exec_t,s0)
+/usr/bin/restorecond -- gen_context(system_u:object_r:restorecond_exec_t,s0)
+/usr/bin/run_init -- gen_context(system_u:object_r:run_init_exec_t,s0)
+/usr/bin/setfiles.* -- gen_context(system_u:object_r:setfiles_exec_t,s0)
+/usr/bin/setsebool -- gen_context(system_u:object_r:semanage_exec_t,s0)
+/usr/bin/semanage -- gen_context(system_u:object_r:semanage_exec_t,s0)
+/usr/bin/semodule -- gen_context(system_u:object_r:semanage_exec_t,s0)
/usr/lib/systemd/system/restorecond.*\.service -- gen_context(system_u:object_r:restorecond_unit_t,s0)
diff --git a/policy/modules/system/setrans.fc b/policy/modules/system/setrans.fc
index 6e60bbe7..00772065 100644
--- a/policy/modules/system/setrans.fc
+++ b/policy/modules/system/setrans.fc
@@ -2,6 +2,8 @@
/run/setrans(/.*)? gen_context(system_u:object_r:setrans_var_run_t,mls_systemhigh)
+/usr/bin/mcstransd -- gen_context(system_u:object_r:setrans_exec_t,s0)
+
/usr/lib/systemd/system/mcstrans.*\.service -- gen_context(system_u:object_r:setrans_unit_t,s0)
/usr/sbin/mcstransd -- gen_context(system_u:object_r:setrans_exec_t,s0)
diff --git a/policy/modules/system/sysnetwork.fc b/policy/modules/system/sysnetwork.fc
index 154ecd01..c71281bd 100644
--- a/policy/modules/system/sysnetwork.fc
+++ b/policy/modules/system/sysnetwork.fc
@@ -33,8 +33,21 @@ ifdef(`distro_redhat',`
#
# /usr
#
-/usr/bin/ifconfig -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
-/usr/bin/ip -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/dhclient.* -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
+/usr/bin/dhcdbd -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
+/usr/bin/dhcp6c -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
+/usr/bin/dhcpcd -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
+/usr/bin/ethtool -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/ifconfig -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/ip -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/ipx_configure -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/ipx_interface -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/ipx_internal_net -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/iw -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/iwconfig -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/mii-tool -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
+/usr/bin/pump -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
+/usr/bin/tc -- gen_context(system_u:object_r:ifconfig_exec_t,s0)
/usr/sbin/dhclient.* -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
/usr/sbin/dhcdbd -- gen_context(system_u:object_r:dhcpc_exec_t,s0)
diff --git a/policy/modules/system/udev.fc b/policy/modules/system/udev.fc
index 0e433bed..68c047c1 100644
--- a/policy/modules/system/udev.fc
+++ b/policy/modules/system/udev.fc
@@ -9,11 +9,13 @@
/etc/udev/rules.d(/.*)? gen_context(system_u:object_r:udev_rules_t,s0)
/etc/udev/scripts/.+ -- gen_context(system_u:object_r:udev_helper_exec_t,s0)
-/usr/bin/udevinfo -- gen_context(system_u:object_r:udev_exec_t,s0)
-
-ifdef(`distro_debian',`
+/usr/bin/udev -- gen_context(system_u:object_r:udev_exec_t,s0)
/usr/bin/udevadm -- gen_context(system_u:object_r:udev_exec_t,s0)
-')
+/usr/bin/udevd -- gen_context(system_u:object_r:udev_exec_t,s0)
+/usr/bin/udevinfo -- gen_context(system_u:object_r:udev_exec_t,s0)
+/usr/bin/udevsend -- gen_context(system_u:object_r:udev_exec_t,s0)
+/usr/bin/udevstart -- gen_context(system_u:object_r:udev_exec_t,s0)
+/usr/bin/wait_for_sysfs -- gen_context(system_u:object_r:udev_exec_t,s0)
ifdef(`distro_debian',`
/usr/lib/udev/create_static_nodes -- gen_context(system_u:object_r:udev_exec_t,s0)