mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-20 20:14:56 +00:00
feat: add check for hardened_malloc flatpak preload (#412)
* updated has_permission to use regex matching * added flatpak check for hardened_malloc * changed hasPermission to maintain old behavior for strings
This commit is contained in:
@@ -356,7 +356,7 @@ audit-secureblue:
|
||||
local line=$(grep "^${prefix}=" <<< "$permissions" | sed -e "s/^${prefix}=//" -e "s/#.*//")
|
||||
IFS=';' read -r -a list <<< "$line"
|
||||
for p in ${list[@]}; do
|
||||
if [[ "$p" == "$query" ]]; then
|
||||
if [[ "$p" =~ ^$query$ ]]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
@@ -572,6 +572,10 @@ audit-secureblue:
|
||||
status="$STATUS_FAILURE"
|
||||
warnings+=("> $f has x11 access!")
|
||||
fi
|
||||
if ! hasPermission "$permissions" "LD_PRELOAD" .*"/libhardened_malloc.so"; then
|
||||
status="$STATUS_FAILURE"
|
||||
warnings+=("> $f is not using hardened_malloc!")
|
||||
fi
|
||||
flatpak_test_string="Auditing $f"
|
||||
print_status "$flatpak_test_string" "$status"
|
||||
for warning in "${warnings[@]}"; do
|
||||
|
||||
Reference in New Issue
Block a user