From 5e80e001e56e7fa833d95e2797451edfcddc9894 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Thu, 9 Jul 2015 17:32:20 -0300 Subject: [PATCH] Adds Components information to the audit logs --- src/assay.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/assay.cc b/src/assay.cc index cb295d53..bffa2d2e 100644 --- a/src/assay.cc +++ b/src/assay.cc @@ -792,6 +792,19 @@ std::string Assay::to_json(int parts) { LOGFY_ADD("secrules_engine", Rules::ruleEngineStateString(m_rules->secRuleEngine)); + /* producer > components */ + yajl_gen_string(g, + reinterpret_cast("components"), + strlen("components")); + + yajl_gen_array_open(g); + for (auto a : m_rules->components) { + yajl_gen_string(g, + reinterpret_cast + (a.c_str()), a.length()); + } + yajl_gen_array_close(g); + /* end: producer */ yajl_gen_map_close(g);