summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/journald-audit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c
index d88d67c5bd..520d1cbb31 100644
--- a/src/journal/journald-audit.c
+++ b/src/journal/journald-audit.c
@@ -354,7 +354,7 @@ static void process_audit_string(Server *s, int type, const char *data, size_t s
if (!p)
return;
- if (sscanf(p, "(%" PRIi64 ".%" PRIi64 ":%" PRIi64 "): %n",
+ if (sscanf(p, "(%" PRIi64 ".%" PRIi64 ":%" PRIi64 "):%n",
&seconds,
&msec,
&id,
@@ -362,6 +362,10 @@ static void process_audit_string(Server *s, int type, const char *data, size_t s
return;
p += k;
+ p += strspn(p, WHITESPACE);
+
+ if (isempty(p))
+ return;
n_iov_allocated = N_IOVEC_META_FIELDS + 5;
iov = new(struct iovec, n_iov_allocated);
@@ -382,7 +386,7 @@ static void process_audit_string(Server *s, int type, const char *data, size_t s
sprintf(id_field, "_AUDIT_ID=%" PRIu64, id);
IOVEC_SET_STRING(iov[n_iov++], id_field);
- m = strappenda("MESSAGE=", data);
+ m = strappenda("MESSAGE=audit: ", p);
IOVEC_SET_STRING(iov[n_iov++], m);
z = n_iov;