Relaxing the audit log sanity checks to allow empty relevant status

This commit is contained in:
Felipe Zimmerle 2017-08-20 15:52:07 -03:00
parent 09ee471498
commit bf281eb4df
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -228,9 +228,15 @@ bool AuditLog::init(std::string *error) {
/* Sanity check */ /* Sanity check */
if (m_status == RelevantOnlyAuditLogStatus) { if (m_status == RelevantOnlyAuditLogStatus) {
if (m_relevant.empty()) { if (m_relevant.empty()) {
/*
error->assign("m_relevant cannot be null while status is set to " \ error->assign("m_relevant cannot be null while status is set to " \
"RelevantOnly"); "RelevantOnly");
return false; return false;
*/
// FIXME: this should be a warning. There is not point to
// have the logs on relevant only if nothing is relevant.
//
// Not returning an error to keep the compatibility with v2.
} }
} }