Add missing function exports to library files

QA scan found 4 library files with functions that weren't exported,
making them unavailable in subshells and nested calls.

Added export statements for:
- lib/attack-signatures.sh: 3 functions
- lib/http-attack-analyzer.sh: 5 functions
- lib/email-functions.sh: 18 functions
- lib/rate-anomaly-detector.sh: 9 functions

Total: 35 functions now properly exported

This ensures functions are available when libraries are sourced by
scripts that spawn subshells or use process substitution.
This commit is contained in:
cschantz
2026-01-02 16:23:17 -05:00
parent 87c69cd59b
commit 682bd69cf8
4 changed files with 43 additions and 0 deletions
+20
View File
@@ -291,3 +291,23 @@ if ! type detect_control_panel &>/dev/null; then
fi
}
fi
# Export functions for use in subshells
export -f detect_mta
export -f get_mail_log_path
export -f get_mailbox_base_path
export -f validate_email
export -f get_email_domain
export -f get_email_local
export -f format_size
export -f check_mta_running
export -f get_mta_version
export -f get_queue_count
export -f check_dns_record
export -f get_primary_ip
export -f is_valid_ip
export -f get_reverse_dns
export -f send_test_email
export -f parse_exim_email
export -f get_log_date_range
export -f count_by_sender