mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -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
@ -68,6 +68,14 @@ tmp() {
|
|||||||
touch "/var/run/remount-secure/${FUNCNAME}"
|
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() {
|
end() {
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
}
|
}
|
||||||
@ -77,6 +85,7 @@ main() {
|
|||||||
run "$@"
|
run "$@"
|
||||||
shm "$@"
|
shm "$@"
|
||||||
tmp "$@"
|
tmp "$@"
|
||||||
|
securityfs "$@"
|
||||||
end "$@"
|
end "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user