mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-02-17 17:04:09 -05:00
remount /lib with nosuid,nodev
https://forums.whonix.org/t/re-mount-home-and-other-with-noexec-and-nosuid-among-other-useful-mount-options-for-better-security/7707/22
This commit is contained in:
parent
7f20160477
commit
af0f074987
@ -76,6 +76,15 @@ securityfs() {
|
||||
touch "/var/run/remount-secure/${FUNCNAME}"
|
||||
}
|
||||
|
||||
lib() {
|
||||
if [ -e "/var/run/remount-secure/${FUNCNAME}" ]; then
|
||||
return 0
|
||||
fi
|
||||
## Not using noexec on /lib.
|
||||
mount -o nosuid,nodev --bind /lib /lib || exit_code=7
|
||||
touch "/var/run/remount-secure/${FUNCNAME}"
|
||||
}
|
||||
|
||||
end() {
|
||||
exit $exit_code
|
||||
}
|
||||
@ -86,6 +95,7 @@ main() {
|
||||
shm "$@"
|
||||
tmp "$@"
|
||||
securityfs "$@"
|
||||
lib "$@"
|
||||
end "$@"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user