From: Gary Lockyer Date: Thu, 22 Jan 2026 20:33:10 +0000 (+1300) Subject: lib:audit_logging JSON remove leading spaces X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35cb872ab44ba9fe0782164a979c112705374cee;p=thirdparty%2Fsamba.git lib:audit_logging JSON remove leading spaces Remove the leading spaces in JSON audit lines. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15898 Signed-off-by: Gary Lockyer Reviewed-by: Volker Lendecke --- diff --git a/lib/audit_logging/audit_logging.c b/lib/audit_logging/audit_logging.c index e2fe4b0edb7..58f32df1a25 100644 --- a/lib/audit_logging/audit_logging.c +++ b/lib/audit_logging/audit_logging.c @@ -132,14 +132,10 @@ void audit_log_json(struct json_object* message, return; } /* - * This is very strange, but we call this routine to get a log - * output without the header. JSON logs all have timestamps - * so this only makes parsing harder. - * - * We push out the raw JSON blob without a prefix, consumers - * can find such lines by the leading { + * Output a single line to the logs, with no prefix + * or time stamps, any embedded '\n' chars will be removed */ - DEBUGADDC(debug_class, debug_level, ("%s\n", s)); + DEBUGJSONC(debug_class, debug_level, (s)); TALLOC_FREE(frame); }