Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
http-testing
>
tortix-waf
> asl3-logging.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File asl3-logging.patch of Package tortix-waf
diff -ruN modsecurity-apache_2.6.0-rc2/apache2/modsecurity.c modsecurity-apache_2.6.0-rc2-new/apache2/modsecurity.c --- modsecurity-apache_2.6.0-rc2/apache2/modsecurity.c 2011-05-02 10:16:03.000000000 -0400 +++ modsecurity-apache_2.6.0-rc2-new/apache2/modsecurity.c 2011-05-04 16:15:29.000000000 -0400 @@ -37,8 +37,14 @@ rule_message, msre_format_metadata(msr, actionset)); } else { - message = apr_psprintf(msr->mp, "%s %s%s", action_message, - rule_message, msre_format_metadata(msr, actionset)); + //message = apr_psprintf(msr->mp, "%s %s%s", action_message, + // rule_message, msre_format_metadata(msr, actionset)); + message = apr_psprintf(msr->mp, "%s %s %s", + msre_format_metadata(msr, actionset), + action_message, + rule_message + ); + } return message; diff -ruN modsecurity-apache_2.6.0-rc2/apache2/msc_logging.c modsecurity-apache_2.6.0-rc2-new/apache2/msc_logging.c --- modsecurity-apache_2.6.0-rc2/apache2/msc_logging.c 2011-05-02 10:16:03.000000000 -0400 +++ modsecurity-apache_2.6.0-rc2-new/apache2/msc_logging.c 2011-05-04 16:17:46.000000000 -0400 @@ -185,12 +185,19 @@ *was_limited = 0; } - return apr_psprintf(msr->mp, "%s %s %s %s [%s] \"%s\" %u %s \"%s\" \"%s\" %s \"%s\"", - hostname, msr->remote_addr, remote_user, - local_user, current_logtime(msr->mp), the_request, - msr->response_status, bytes_sent, referer, user_agent, - uniqueid, sessionid - ); + //return apr_psprintf(msr->mp, "%s %s %s %s [%s] \"%s\" %u %s \"%s\" \"%s\" %s \"%s\"", + // hostname, msr->remote_addr, remote_user, + // local_user, current_logtime(msr->mp), the_request, + // msr->response_status, bytes_sent, referer, user_agent, + // uniqueid, sessionid + //); + return apr_psprintf(msr->mp, "[modsecurity] [client %s] [domain %s] [%i]", + msr->remote_addr, + hostname, + msr->response_status + ); + + } /** @@ -1149,8 +1156,10 @@ /* Calculate hash of the entry. */ apr_md5_final(md5hash, &msr->new_auditlog_md5ctx); - str2 = apr_psprintf(msr->mp, "%s %d %d md5:%s", msr->new_auditlog_filename, 0, - msr->new_auditlog_size, bytes2hex(msr->mp, md5hash, 16)); + //str2 = apr_psprintf(msr->mp, "%s %d %d md5:%s", msr->new_auditlog_filename, 0, + // msr->new_auditlog_size, bytes2hex(msr->mp, md5hash, 16)); + str2 = apr_psprintf(msr->mp, "[%s]", msr->new_auditlog_filename); + if (str2 == NULL) return; /* We do not want the index line to be longer than 3980 bytes. */ @@ -1177,7 +1186,9 @@ if (str1 == NULL) return; if (was_limited == 0) { - text = apr_psprintf(msr->mp, "%s %s \n", str1, str2); + //text = apr_psprintf(msr->mp, "%s %s \n", str1, str2); + text = apr_psprintf(msr->mp, "%s %s %s\n", str1, str2, ((char **)msr->alerts->elts)[0]); + } else { text = apr_psprintf(msr->mp, "%s %s L\n", str1, str2); }