ju5t patch to fix mpm-itk mod_ruid2 compatibility

This commit is contained in:
Victor Hora
2018-09-22 18:33:12 -04:00
committed by Victor Hora
parent d50650ba4f
commit a3dc602128
2 changed files with 41 additions and 5 deletions

View File

@@ -230,10 +230,20 @@ static char *construct_auditlog_filename(apr_pool_t *mp, const char *uniqueid) {
char tstr[300];
apr_size_t len;
/**
* This is required for mpm-itk & mod_ruid2, though should be harmless for other implementations
* It also changes the return statement.
*/
char *username;
apr_uid_t uid;
apr_gid_t gid;
apr_uid_current(&uid, &gid, mp);
apr_uid_name_get(&username, uid, mp);
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);
return apr_psprintf(mp, "%s-%s", tstr, uniqueid);
return apr_psprintf(mp, "/%s%s-%s", username, tstr, uniqueid);
}
/**