mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
fix mode sanity check
no longer use seq due to issue https://forums.whonix.org/t/permission-hardening/8655/13
This commit is contained in:
parent
ddc0eec63d
commit
d5f1bd8dd2
@ -126,7 +126,12 @@ set_file_perms() {
|
|||||||
|
|
||||||
add_nosuid_statoverride_entry
|
add_nosuid_statoverride_entry
|
||||||
else
|
else
|
||||||
if ! seq -w 000 4777 | grep -qw "$mode_from_config"; then
|
string_length_of_mode_from_config="${#mode_from_config}"
|
||||||
|
if [ "$string_length_of_mode_from_config" -gt "4" ]; then
|
||||||
|
echo "ERROR: Mode '$mode_from_config' is invalid!" >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ "$string_length_of_mode_from_config" -lt "3" ]; then
|
||||||
echo "ERROR: Mode '$mode_from_config' is invalid!" >&2
|
echo "ERROR: Mode '$mode_from_config' is invalid!" >&2
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user