From 3d4ef0c814698381371c9d5563cf158950af896c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 26 Nov 2007 11:00:39 +0000 Subject: Add option --data to GETAUDITLOG command. Return HTML formatted dummy output. --- common/audit.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'common/audit.c') diff --git a/common/audit.c b/common/audit.c index baa7d8d51..d82052363 100644 --- a/common/audit.c +++ b/common/audit.c @@ -297,18 +297,20 @@ audit_log_cert (audit_ctx_t ctx, audit_event_t event, /* Print the formatted audit result. THIS IS WORK IN PROGRESS. */ void -audit_print_result (audit_ctx_t ctx, FILE *fp) +audit_print_result (audit_ctx_t ctx, estream_t out) { int idx; int maxlen; size_t n; + es_fputs ("
\n", out); + if (!ctx) - return; + goto leave; if (!ctx->log || !ctx->logused) { - fprintf (fp, "AUDIT-LOG: No entries\n"); - return; + es_fprintf (out, "

AUDIT-LOG: No entries

\n"); + goto leave; } for (idx=0,maxlen=0; idx < DIM (eventstr_msgidx); idx++) @@ -318,19 +320,24 @@ audit_print_result (audit_ctx_t ctx, FILE *fp) maxlen = n; } + es_fputs ("\n", out); + + leave: + es_fputs ("
\n", out); } -- cgit v1.2.3