mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-05-03 01:14:48 -04:00
remount /sys/kernel/security with nodev,nosuid[,noexec]
as suggested by @madaidan http://forums.whonix.org/t/apparmor-for-complete-system-including-init-pid1-systemd-everything-full-system-mac-policy/8339/238
This commit is contained in:
parent
2c4170e6f3
commit
f68efd53cf
1 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,14 @@ tmp() {
|
|||
touch "/var/run/remount-secure/${FUNCNAME}"
|
||||
}
|
||||
|
||||
securityfs() {
|
||||
if [ -e "/var/run/remount-secure/${FUNCNAME}" ]; then
|
||||
return 0
|
||||
fi
|
||||
mount -o nosuid,nodev${noexec_maybe} --bind /tmp /tmp || exit_code=5
|
||||
touch "/var/run/remount-secure/${FUNCNAME}"
|
||||
}
|
||||
|
||||
end() {
|
||||
exit $exit_code
|
||||
}
|
||||
|
@ -77,6 +85,7 @@ main() {
|
|||
run "$@"
|
||||
shm "$@"
|
||||
tmp "$@"
|
||||
securityfs "$@"
|
||||
end "$@"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue