|
|
|
|
@ -57,6 +57,7 @@
|
|
|
|
|
typedef struct OutputSshCtx_ {
|
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
|
uint32_t flags; /** Store mode */
|
|
|
|
|
bool include_metadata;
|
|
|
|
|
} OutputSshCtx;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -109,6 +110,10 @@ static int JsonSshLogger(ThreadVars *tv, void *thread_data, const Packet *p,
|
|
|
|
|
if (unlikely(js == NULL))
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
if (ssh_ctx->include_metadata) {
|
|
|
|
|
JsonAddMetadata(p, f, js);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
json_t *tjs = json_object();
|
|
|
|
|
if (tjs == NULL) {
|
|
|
|
|
free(js);
|
|
|
|
|
@ -244,6 +249,7 @@ static OutputInitResult OutputSshLogInitSub(ConfNode *conf, OutputCtx *parent_ct
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ssh_ctx->file_ctx = ojc->file_ctx;
|
|
|
|
|
ssh_ctx->include_metadata = ojc->include_metadata;
|
|
|
|
|
|
|
|
|
|
output_ctx->data = ssh_ctx;
|
|
|
|
|
output_ctx->DeInit = OutputSshLogDeinitSub;
|
|
|
|
|
|