Append a newline to concurrent JSON audit logs

This commit is contained in:
Robert Paprocki
2016-10-19 14:51:59 -07:00
committed by Felipe Zimmerle
parent c95d93483b
commit a34f9eb785

View File

@@ -1423,11 +1423,12 @@ void sec_audit_logger_json(modsec_rec *msr) {
yajl_gen_clear(g); yajl_gen_clear(g);
yajl_gen_free(g); yajl_gen_free(g);
sec_auditlog_write(msr, "\n", 1);
/* Return here if we were writing to a serial log /* Return here if we were writing to a serial log
* as it does not need an index file. * as it does not need an index file.
*/ */
if (msr->txcfg->auditlog_type != AUDITLOG_CONCURRENT) { if (msr->txcfg->auditlog_type != AUDITLOG_CONCURRENT) {
sec_auditlog_write(msr, "\n", 1);
/* Unlock the mutex we used to serialise access to the audit log file. */ /* Unlock the mutex we used to serialise access to the audit log file. */
rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock); rc = apr_global_mutex_unlock(msr->modsecurity->auditlog_lock);