diff --git a/usr/lib/security-misc/permission-hardening b/usr/lib/security-misc/permission-hardening index 8ae7344..d89444e 100755 --- a/usr/lib/security-misc/permission-hardening +++ b/usr/lib/security-misc/permission-hardening @@ -247,7 +247,9 @@ set_file_perms() { else exit_code=200 echo "ERROR: cannot parse line with invalid character. line: '$line'" >&2 - continue + ## Safer to exit with error in this case. + ## https://forums.whonix.org/t/disable-suid-binaries/7706/59 + exit "$exit_code" fi #global fso @@ -255,7 +257,9 @@ set_file_perms() { if ! read -r fso mode_from_config owner_from_config group_from_config capability_from_config <<< "$line" ; then exit_code=201 echo "ERROR: cannot parse. line: '$line'" >&2 - continue + ## Safer to exit with error in this case. + ## https://forums.whonix.org/t/disable-suid-binaries/7706/59 + exit "$exit_code" fi local fso_without_trailing_slash