Pull SELinux updates from Paul Moore: "Six SELinux patches, all are simple and easily understood, but a list of the highlights is below: - Use 'grep -E' instead of 'egrep' in the SELinux policy install script. Fun fact, this seems to be GregKH's *second* dedicated SELinux patch since we transitioned to git (ignoring merges, the SPDX stuff, and a trivial fs reference removal when lustre was yanked); the first was back in 2011 when selinuxfs was placed in /sys/fs/selinux. Oh, the memories ... - Convert the SELinux policy boolean values to use signed integer types throughout the SELinux kernel code. Prior to this we were using a mix of signed and unsigned integers which was probably okay in this particular case, but it is definitely not a good idea in general. - Remove a reference to the SELinux runtime disable functionality in /etc/selinux/config as we are in the process of deprecating that. See [1] for more background on this if you missed the previous notes on the deprecation. - Minor cleanups: remove unneeded variables and function parameter constification" Link: https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-runtime-disable [1] * tag 'selinux-pr-20221003' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: remove runtime disable message in the install_policy.sh script selinux: use "grep -E" instead of "egrep" selinux: remove the unneeded result variable selinux: declare read-only parameters const selinux: use int arrays for boolean values selinux: remove an unneeded variable in sel_make_class_dir_entries()
Showing the changes to scripts (1 of 7 files). Show all
Unified · Split
| @@ -31,8 +31,7 @@ fi · 30 unmodified lines | |||
| 31 | if selinuxenabled; then | 31 | if selinuxenabled; then |
| 32 | echo "SELinux is already enabled" | 32 | echo "SELinux is already enabled" |
| 33 | echo "This prevents safely relabeling all files." | 33 | echo "This prevents safely relabeling all files." |
| 34 | echo "Boot with selinux=0 on the kernel command-line or" | 34 | echo "Boot with selinux=0 on the kernel command-line." |
| 35 | echo "SELINUX=disabled in /etc/selinux/config." | ||
| 36 | exit 1 | 35 | exit 1 |
| 37 | fi | 36 | fi |
| 38 | 37 | ||
| @@ -78,7 +77,7 @@ cd /etc/selinux/dummy/contexts/files · 39 unmodified lines | |||
| 78 | $SF -F file_contexts / | 77 | $SF -F file_contexts / |
| 79 | 78 | ||
| 80 | mounts=`cat /proc/$$/mounts | \ | 79 | mounts=`cat /proc/$$/mounts | \ |
| 81 | egrep "ext[234]|jfs|xfs|reiserfs|jffs2|gfs2|btrfs|f2fs|ocfs2" | \ | 80 | grep -E "ext[234]|jfs|xfs|reiserfs|jffs2|gfs2|btrfs|f2fs|ocfs2" | \ |
| 82 | awk '{ print $2 '}` | 81 | awk '{ print $2 '}` |
| 83 | $SF -F file_contexts $mounts | 82 | $SF -F file_contexts $mounts |
| 84 | 83 | ||