From 0d298d47a1d280922ccf6363166fb7b0fe83fa7d Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Mon, 29 Jun 2020 09:51:35 -0400 Subject: [PATCH] output/rdp: Include common output options This commit will cause common metadata values and the community id to be included in log output when configured. --- src/output-json-rdp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output-json-rdp.c b/src/output-json-rdp.c index d28336ce11..d9d5c33e1b 100644 --- a/src/output-json-rdp.c +++ b/src/output-json-rdp.c @@ -46,6 +46,7 @@ typedef struct LogRdpFileCtx_ { LogFileCtx *file_ctx; uint32_t flags; + OutputJsonCommonSettings cfg; } LogRdpFileCtx; typedef struct LogRdpLogThread_ { @@ -70,6 +71,7 @@ static int JsonRdpLogger(ThreadVars *tv, void *thread_data, } json_object_set_new(js, "rdp", rdp_js); + JsonAddCommonOptions(&thread->rdplog_ctx->cfg, p, f, js); MemBufferReset(thread->buffer); OutputJSONBuffer(js, thread->rdplog_ctx->file_ctx, &thread->buffer); json_decref(js); @@ -99,6 +101,7 @@ static OutputInitResult OutputRdpLogInitSub(ConfNode *conf, return result; } rdplog_ctx->file_ctx = ajt->file_ctx; + rdplog_ctx->cfg = ajt->cfg; OutputCtx *output_ctx = SCCalloc(1, sizeof(*output_ctx)); if (unlikely(output_ctx == NULL)) {