Merge pull request #10 from tommytran732/patch-7

Some security settings from the Arch Wiki
This commit is contained in:
Tommaso Chiti 2021-04-16 07:29:10 +02:00 committed by GitHub
commit 77ddd82d57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,6 +187,16 @@ arch-chroot /mnt /bin/bash -e <<EOF
echo "Creating GRUB config file."
grub-mkconfig -o /boot/grub/grub.cfg &>/dev/null
#Security kernel settings
echo "kernel.kptr_restrict = 2" > /etc/sysctl.d/51-kptr-restrict.conf
echo "kernel.kexec_load_disabled = 1" > /etc/sysctl.d/51-kexec-restrict.conf
echo << EOF >> /etc/sysctl.d/10-security.conf
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
net.core.bpf_jit_harden = 2
kernel.yama.ptrace_scope = 3
EOF
EOF
# Setting root password.