mirror of
https://abf.rosa.ru/djam/kernel-5.10.git
synced 2025-02-25 01:32:48 +00:00
Fix kernel opts for booting in enforcing selinux mode
1f5dcdbf22
eshatokhin@: CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE is not used since
mainline commit be6ec88f41ba "selinux: Remove SECURITY_SELINUX_BOOTPARAM_VALUE",
so it is not set here.
This commit is contained in:
parent
7a64052e96
commit
d43e01981e
1 changed files with 8 additions and 3 deletions
11
kernel.spec
11
kernel.spec
|
@ -706,10 +706,15 @@ sed -i 's/CONFIG_STACKPROTECTOR_STRONG=y/# CONFIG_STACKPROTECTOR_STRONG is not s
|
||||||
sed -i 's/# CONFIG_DEBUG_INFO is not set/CONFIG_DEBUG_INFO=y\nCONFIG_DEBUG_INFO_DWARF4=y\nCONFIG_GDB_SCRIPTS=y/' .config
|
sed -i 's/# CONFIG_DEBUG_INFO is not set/CONFIG_DEBUG_INFO=y\nCONFIG_DEBUG_INFO_DWARF4=y\nCONFIG_GDB_SCRIPTS=y/' .config
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Enable hardening features if requested.
|
|
||||||
%if %{enhanced_security}
|
%if %{enhanced_security}
|
||||||
sed -i 's/# CONFIG_PAX_MEMORY_SANITIZE is not set/CONFIG_PAX_MEMORY_SANITIZE=y/' .config
|
# seems to be needed to boot system in enforcing selinux mode
|
||||||
sed -i 's/# CONFIG_PAGE_POISONING is not set/CONFIG_PAGE_POISONING=y\nCONFIG_PAGE_POISONING_NO_SANITY=y/' .config
|
# note: cpio fpormat of initramfs does not support xattrs without patches
|
||||||
|
# see also: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1680315
|
||||||
|
sed -i '/CONFIG_SECURITY_SELINUX_DISABLE/d' .config
|
||||||
|
echo CONFIG_SECURITY_SELINUX_DISABLE=y >> .config
|
||||||
|
# enable selinux in kernel by default if not disabled explicitly
|
||||||
|
sed -i '/CONFIG_SECURITY_SELINUX_BOOTPARAM/d' .config
|
||||||
|
echo CONFIG_SECURITY_SELINUX_BOOTPARAM=y >> .config
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Store the config file in the appropriate directory.
|
# Store the config file in the appropriate directory.
|
||||||
|
|
Loading…
Add table
Reference in a new issue