mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
exit with error if a config line cannot be processed rather than skipping
https://forums.whonix.org/t/disable-suid-binaries/7706/59
This commit is contained in:
parent
d5c99f3a60
commit
e3e1ff2a31
@ -247,7 +247,9 @@ set_file_perms() {
|
|||||||
else
|
else
|
||||||
exit_code=200
|
exit_code=200
|
||||||
echo "ERROR: cannot parse line with invalid character. line: '$line'" >&2
|
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
|
fi
|
||||||
|
|
||||||
#global fso
|
#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
|
if ! read -r fso mode_from_config owner_from_config group_from_config capability_from_config <<< "$line" ; then
|
||||||
exit_code=201
|
exit_code=201
|
||||||
echo "ERROR: cannot parse. line: '$line'" >&2
|
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
|
fi
|
||||||
|
|
||||||
local fso_without_trailing_slash
|
local fso_without_trailing_slash
|
||||||
|
Loading…
Reference in New Issue
Block a user