Skip to content

Commit f051286

Browse files
committed
fix: add error logging
Signed-off-by: Felipe Zipitria <[email protected]>
1 parent 1d83852 commit f051286

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apache2/modsecurity.c

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ int acquire_global_lock(apr_global_mutex_t *lock, apr_pool_t *mp) {
131131
// get platform temp dir
132132
rc = apr_temp_dir_get(&temp_dir, mp);
133133
if (rc != APR_SUCCESS) {
134+
ap_log_perror("ModSecurity: Could not get temp dir");
134135
return -1;
135136
}
136137

@@ -139,13 +140,15 @@ int acquire_global_lock(apr_global_mutex_t *lock, apr_pool_t *mp) {
139140

140141
rc = apr_file_mktemp(&lock_name, path, 0, mp);
141142
if (rc != APR_SUCCESS) {
143+
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, NULL, " ModSecurity: Could not create temporary file for global lock");
142144
return -1;
143145
}
144146
// below func always return APR_SUCCESS
145147
apr_file_name_get(&filename, lock_name);
146148

147149
rc = apr_global_mutex_create(&lock, filename, APR_LOCK_DEFAULT, mp);
148150
if (rc != APR_SUCCESS) {
151+
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, NULL, " ModSecurity: Could not create global mutex");
149152
return -1;
150153
}
151154
return APR_SUCCESS;

0 commit comments

Comments
 (0)