mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
refactoring
This commit is contained in:
parent
b756314eb8
commit
2d465c6249
@ -12,6 +12,7 @@ set -euo pipefail
|
|||||||
shopt -s failglob
|
shopt -s failglob
|
||||||
|
|
||||||
more_info_link="https://forums.whonix.org/t/automate-mmap-randomisation-to-fix-ppc64el/16514"
|
more_info_link="https://forums.whonix.org/t/automate-mmap-randomisation-to-fix-ppc64el/16514"
|
||||||
|
aslr_mmap_config_file="/etc/sysctl.d/30_security-misc_aslr-mmap.conf"
|
||||||
|
|
||||||
exit_with_error() {
|
exit_with_error() {
|
||||||
echo "$0: SEE ALSO:" >&2
|
echo "$0: SEE ALSO:" >&2
|
||||||
@ -69,9 +70,9 @@ vm.mmap_rnd_bits=${BITS_MAX}
|
|||||||
vm.mmap_rnd_compat_bits=${COMPAT_BITS_MAX}"
|
vm.mmap_rnd_compat_bits=${COMPAT_BITS_MAX}"
|
||||||
|
|
||||||
## Write the sysctl.d conf file.
|
## Write the sysctl.d conf file.
|
||||||
if echo "${SYSCTL}" | tee /etc/sysctl.d/30_security-misc_aslr-mmap.conf > /dev/null ; then
|
if echo "${SYSCTL}" | tee "$aslr_mmap_config_file" > /dev/null ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$0: ERROR: Error writing ASLR map config file '/etc/sysctl.d/30_security-misc_aslr-mmap.conf'!" >&2
|
echo "$0: ERROR: Error writing ASLR map config file '$aslr_mmap_config_file'!" >&2
|
||||||
exit_with_error
|
exit_with_error
|
||||||
|
Loading…
Reference in New Issue
Block a user