Merge pull request #53 from madaidan/sysctl-initramfs

Set sysctl values in initramfs
This commit is contained in:
Patrick Schleizer 2020-01-15 11:02:30 +00:00 committed by GitHub
commit 087465a0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 0 deletions

3
debian/control vendored
View File

@ -116,6 +116,9 @@ Description: enhances misc security settings
.
* The vivid kernel module is blacklisted as it's only required for testing
and has been the cause of multiple vulnerabilities.
.
* An initramfs hook sets the sysctl values in /etc/sysctl.d before init
is executed so our hardening is enabled as early as possible.
.
* The kernel panics on oopses to prevent it from continuing to run a flawed
process and to deter brute forcing.

View File

@ -0,0 +1,21 @@
#!/bin/sh
## Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.
set -e
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/sysctl /sbin

View File

@ -0,0 +1,18 @@
#!/bin/sh
## Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
sysctl -p ${rootmnt}/etc/sysctl.d/*.conf