mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-03-10 04:48:10 +07: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}"
|
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() {
|
end() {
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
}
|
}
|
||||||
@ -86,6 +95,7 @@ main() {
|
|||||||
shm "$@"
|
shm "$@"
|
||||||
tmp "$@"
|
tmp "$@"
|
||||||
securityfs "$@"
|
securityfs "$@"
|
||||||
|
lib "$@"
|
||||||
end "$@"
|
end "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user