mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
journald: include audit message type number in MESSAGE= string
This commit is contained in:
parent
9833a66c7e
commit
25b3245fb4
@ -345,7 +345,7 @@ static void process_audit_string(Server *s, int type, const char *data, size_t s
|
||||
char id_field[sizeof("_AUDIT_ID=") + DECIMAL_STR_MAX(uint64_t)],
|
||||
type_field[sizeof("_AUDIT_TYPE=") + DECIMAL_STR_MAX(int)],
|
||||
source_time_field[sizeof("_SOURCE_REALTIME_TIMESTAMP=") + DECIMAL_STR_MAX(usec_t)];
|
||||
const char *m;
|
||||
char *m;
|
||||
|
||||
assert(s);
|
||||
|
||||
@ -396,7 +396,8 @@ 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=audit: ", p);
|
||||
m = alloca(strlen("MESSAGE=audit-") + DECIMAL_STR_MAX(int) + strlen(": ") + strlen(p) + 1);
|
||||
sprintf(m, "MESSAGE=audit-%i: %s", type, p);
|
||||
IOVEC_SET_STRING(iov[n_iov++], m);
|
||||
|
||||
z = n_iov;
|
||||
|
Loading…
Reference in New Issue
Block a user