mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-03 17:44:17 -04:00
Merge pull request #308 from maybebyte/permission-hardener-speedboost
perf(permission-hardener): optimize string match
This commit is contained in:
commit
395169fbce
1 changed files with 1 additions and 2 deletions
|
@ -256,8 +256,7 @@ check_nosuid_whitelist() {
|
||||||
[[ " ${policy_exact_white_list[*]} " =~ " ${target_file} " ]] && return 1
|
[[ " ${policy_exact_white_list[*]} " =~ " ${target_file} " ]] && return 1
|
||||||
|
|
||||||
for match_white_list_entry in "${policy_match_white_list[@]:-}"; do
|
for match_white_list_entry in "${policy_match_white_list[@]:-}"; do
|
||||||
if safe_echo "${target_file}" \
|
if [[ "${target_file}" == *"${match_white_list_entry}"* ]]; then
|
||||||
| grep --quiet --fixed-strings -- "${match_white_list_entry}"; then
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue