mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-02-24 03:29:48 -05:00
mmap-rnd-bits: Handle missing kernel config file
This commit is contained in:
parent
2cf105700a
commit
76ca8a27f9
@ -15,7 +15,7 @@ BITS_MAX_DEFAULT=32
|
|||||||
COMPAT_BITS_MAX_DEFAULT=16
|
COMPAT_BITS_MAX_DEFAULT=16
|
||||||
|
|
||||||
## Find the most recently modified Linux config file.
|
## Find the most recently modified Linux config file.
|
||||||
if CONFIG=$(ls -1 -t /boot/config-* | head -n 1)
|
if compgen -G "/boot/config-*" > /dev/null && CONFIG=$(ls -1 -t /boot/config-* | head -n 1)
|
||||||
then
|
then
|
||||||
## Find the relevant config options.
|
## Find the relevant config options.
|
||||||
if ! BITS_MAX=$(grep "CONFIG_ARCH_MMAP_RND_BITS_MAX" "${CONFIG}" | cut -d "=" -f 2)
|
if ! BITS_MAX=$(grep "CONFIG_ARCH_MMAP_RND_BITS_MAX" "${CONFIG}" | cut -d "=" -f 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user