"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "apache2/msc_logging.c" between
modsecurity-2.9.6.tar.gz and modsecurity-2.9.7.tar.gz

About: ModSecurity is an intrusion detection and prevention module (web application firewall) for the Apache (and Nginx) Web servers.

msc_logging.c  (modsecurity-2.9.6):msc_logging.c  (modsecurity-2.9.7)
skipping to change at line 237 skipping to change at line 237
*/ */
static char *construct_auditlog_filename(apr_pool_t *mp, const char *uniqueid) { static char *construct_auditlog_filename(apr_pool_t *mp, const char *uniqueid) {
apr_time_exp_t t; apr_time_exp_t t;
char tstr[300]; char tstr[300];
apr_size_t len; apr_size_t len;
/** /**
* This is required for mpm-itk & mod_ruid2, though should be harmless for o ther implementations * This is required for mpm-itk & mod_ruid2, though should be harmless for o ther implementations
* It also changes the return statement. * It also changes the return statement.
*/ */
char *username; char *userinfo;
apr_status_t rc;
apr_uid_t uid; apr_uid_t uid;
apr_gid_t gid; apr_gid_t gid;
apr_uid_current(&uid, &gid, mp); apr_uid_current(&uid, &gid, mp);
apr_uid_name_get(&username, uid, mp); rc = apr_uid_name_get(&userinfo, uid, mp);
if (rc != APR_SUCCESS) {
userinfo = apr_psprintf(mp, "%u", uid);
}
apr_time_exp_lt(&t, apr_time_now()); apr_time_exp_lt(&t, apr_time_now());
apr_strftime(tstr, &len, 299, "/%Y%m%d/%Y%m%d-%H%M/%Y%m%d-%H%M%S", &t); apr_strftime(tstr, &len, 299, "/%Y%m%d/%Y%m%d-%H%M/%Y%m%d-%H%M%S", &t);
return apr_psprintf(mp, "/%s%s-%s", username, tstr, uniqueid); return apr_psprintf(mp, "/%s%s-%s", userinfo, tstr, uniqueid);
} }
/** /**
* Creates a random 8-character string that * Creates a random 8-character string that
* consists of hexadecimal numbers, to be used * consists of hexadecimal numbers, to be used
* as an audit log boundary. * as an audit log boundary.
*/ */
static char *create_auditlog_boundary(request_rec *r) { static char *create_auditlog_boundary(request_rec *r) {
#ifdef LINUX_S390 #ifdef LINUX_S390
int data = swap_int32(rand()); int data = swap_int32(rand());
 End of changes. 3 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)