From a03e14710e91870e05f3a52294ea5523477dc3db Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Tue, 6 Dec 2011 12:13:42 -0500 Subject: [PATCH] More fixes for the move from /lib, /bin, /sbin, to /usr directory --- policy/modules/kernel/corecommands.fc | 21 +++++++++++++++++++-- policy/modules/system/libraries.fc | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc index de8e41bb..9446ba8f 100644 --- a/policy/modules/kernel/corecommands.fc +++ b/policy/modules/kernel/corecommands.fc @@ -1,7 +1,7 @@ # # /bin # -/bin -d gen_context(system_u:object_r:bin_t,s0) +/bin gen_context(system_u:object_r:bin_t,s0) /bin/.* gen_context(system_u:object_r:bin_t,s0) /bin/d?ash -- gen_context(system_u:object_r:shell_exec_t,s0) /bin/bash -- gen_context(system_u:object_r:shell_exec_t,s0) @@ -146,7 +146,7 @@ ifdef(`distro_gentoo',` # # /sbin # -/sbin -d gen_context(system_u:object_r:bin_t,s0) +/sbin gen_context(system_u:object_r:bin_t,s0) /sbin/.* gen_context(system_u:object_r:bin_t,s0) /sbin/insmod_ksymoops_clean -- gen_context(system_u:object_r:bin_t,s0) /sbin/mkfs\.cramfs -- gen_context(system_u:object_r:bin_t,s0) @@ -179,8 +179,22 @@ ifdef(`distro_gentoo',` # # /usr # +/usr/bin -d gen_context(system_u:object_r:bin_t,s0) /usr/(.*/)?Bin(/.*)? gen_context(system_u:object_r:bin_t,s0) /usr/(.*/)?bin(/.*)? gen_context(system_u:object_r:bin_t,s0) +/usr/bin/.* gen_context(system_u:object_r:bin_t,s0) +/usr/bin/d?ash -- gen_context(system_u:object_r:shell_exec_t,s0) +/usr/bin/bash -- gen_context(system_u:object_r:shell_exec_t,s0) +/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/ksh.* -- gen_context(system_u:object_r:shell_exec_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/sash -- 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) + /usr/bin/git-shell -- 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/scponly -- gen_context(system_u:object_r:shell_exec_t,s0) @@ -261,6 +275,9 @@ ifdef(`distro_gentoo',` /usr/local/Brother/(.*/)?inf/setup.* gen_context(system_u:object_r:bin_t,s0) /usr/local/linuxprinter/filters(/.*)? gen_context(system_u:object_r:bin_t,s0) +/usr/sbin/insmod_ksymoops_clean -- gen_context(system_u:object_r:bin_t,s0) +/usr/sbin/mkfs\.cramfs -- gen_context(system_u:object_r:bin_t,s0) +/usr/sbin/nologin -- gen_context(system_u:object_r:shell_exec_t,s0) /usr/sbin/scponlyc -- gen_context(system_u:object_r:shell_exec_t,s0) /usr/sbin/sesh -- gen_context(system_u:object_r:shell_exec_t,s0) /usr/sbin/smrsh -- gen_context(system_u:object_r:shell_exec_t,s0) diff --git a/policy/modules/system/libraries.fc b/policy/modules/system/libraries.fc index 2bfa2258..39aace99 100644 --- a/policy/modules/system/libraries.fc +++ b/policy/modules/system/libraries.fc @@ -37,7 +37,7 @@ ifdef(`distro_redhat',` # # /lib(64)? # -/lib -d gen_context(system_u:object_r:lib_t,s0) +/lib gen_context(system_u:object_r:lib_t,s0) /lib/.* gen_context(system_u:object_r:lib_t,s0) /lib/ld-[^/]*\.so(\.[^/]*)* -- gen_context(system_u:object_r:ld_so_t,s0) -- 2.47.3