mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-02 21:56:07 -04:00
fix remountsecure kernel parameter logic
This commit is contained in:
parent
3c183294cd
commit
8a592c2e37
1 changed files with 10 additions and 10 deletions
|
@ -13,15 +13,6 @@ remount_hook() {
|
||||||
remountsecure_action=$(getarg remountsecure)
|
remountsecure_action=$(getarg remountsecure)
|
||||||
|
|
||||||
if [ "$remountsecure_action" = "1" ]; then
|
if [ "$remountsecure_action" = "1" ]; then
|
||||||
if ! remount-secure --remountnoexec ; then
|
|
||||||
warn "'remount-secure --remountnoexec' failed."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
info "'remount-secure --remountnoexec' success."
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$remountsecure_action" = "noexec" ]; then
|
|
||||||
if ! remount-secure; then
|
if ! remount-secure; then
|
||||||
warn "'remount-secure' failed."
|
warn "'remount-secure' failed."
|
||||||
return 1
|
return 1
|
||||||
|
@ -30,6 +21,15 @@ remount_hook() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$remountsecure_action" = "noexec" ]; then
|
||||||
|
if ! remount-secure --remountnoexec; then
|
||||||
|
warn "'remount-secure --remountnoexec' failed."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
info "'remount-secure --remountnoexec' success."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
warn "Not using remount-secure."
|
warn "Not using remount-secure."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue