@@ -105,39 +105,39 @@ static int server_limit, thread_limit;
105
105
*
106
106
* \param mp Pointer to memory pool
107
107
*/
108
- static void version (apr_pool_t * mp ) {
108
+ static void version (apr_pool_t * mp , server_rec * s ) {
109
109
char * pcre_vrs = NULL ;
110
110
111
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
111
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
112
112
"ModSecurity: APR compiled version=\"%s\"; "
113
113
"loaded version=\"%s\"" , APR_VERSION_STRING , apr_version_string ());
114
114
115
115
if (strstr (apr_version_string (), APR_VERSION_STRING ) == NULL ) {
116
- ap_log_error (APLOG_MARK , APLOG_WARNING , 0 , NULL , "ModSecurity: Loaded APR do not match with compiled!" );
116
+ ap_log_error (APLOG_MARK , APLOG_WARNING , 0 , s , "ModSecurity: Loaded APR do not match with compiled!" );
117
117
}
118
118
119
119
pcre_vrs = apr_psprintf (mp ,"%d.%d " , PCRE_MAJOR , PCRE_MINOR );
120
120
121
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
121
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
122
122
"ModSecurity: PCRE compiled version=\"%s\"; "
123
123
"loaded version=\"%s\"" , pcre_vrs , pcre_version ());
124
124
125
125
if (strstr (pcre_version (),pcre_vrs ) == NULL ) {
126
- ap_log_error (APLOG_MARK , APLOG_WARNING , 0 , NULL , "ModSecurity: Loaded PCRE do not match with compiled!" );
126
+ ap_log_error (APLOG_MARK , APLOG_WARNING , 0 , s , "ModSecurity: Loaded PCRE do not match with compiled!" );
127
127
}
128
128
129
129
/* Lua version function was removed in current 5.1. Need to check in future versions if it's back */
130
130
#if defined(WITH_LUA )
131
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
131
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
132
132
"ModSecurity: LUA compiled version=\"%s\"" , LUA_VERSION );
133
133
#endif /* WITH_LUA */
134
134
135
135
#ifdef WITH_YAJL
136
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
136
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
137
137
"ModSecurity: YAJL compiled version=\"%d.%d.%d\"" , YAJL_MAJOR , YAJL_MINOR , YAJL_MICRO );
138
138
#endif /* WITH_YAJL */
139
139
140
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
140
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
141
141
"ModSecurity: LIBXML compiled version=\"%s\"" , LIBXML_DOTTED_VERSION );
142
142
}
143
143
@@ -762,7 +762,7 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
762
762
ap_log_error (APLOG_MARK , APLOG_NOTICE | APLOG_NOERRNO , 0 , s ,
763
763
"%s configured." , MODSEC_MODULE_NAME_FULL );
764
764
765
- version (mp );
765
+ version (mp , s );
766
766
767
767
/* If we've changed the server signature make note of the original. */
768
768
if (new_server_signature != NULL ) {
@@ -776,7 +776,7 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
776
776
msc_status_engine_call ();
777
777
}
778
778
else {
779
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
779
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
780
780
"ModSecurity: Status engine is currently disabled, enable " \
781
781
"it by set SecStatusEngine to On." );
782
782
}
@@ -796,14 +796,14 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
796
796
{
797
797
if (remote_rules_server -> amount_of_rules == 1 )
798
798
{
799
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
799
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
800
800
"ModSecurity: Loaded %d rule from: '%s'." ,
801
801
remote_rules_server -> amount_of_rules ,
802
802
remote_rules_server -> uri );
803
803
}
804
804
else
805
805
{
806
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL ,
806
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s ,
807
807
"ModSecurity: Loaded %d rules from: '%s'." ,
808
808
remote_rules_server -> amount_of_rules ,
809
809
remote_rules_server -> uri );
@@ -812,7 +812,7 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
812
812
#endif
813
813
if (remote_rules_fail_message != NULL )
814
814
{
815
- ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , NULL , "ModSecurity: " \
815
+ ap_log_error (APLOG_MARK , APLOG_NOTICE , 0 , s , "ModSecurity: " \
816
816
"Problems loading external resources: %s" ,
817
817
remote_rules_fail_message );
818
818
}
0 commit comments