When systemd was compiled without audit support, do not collect the
audit session and loginuid in the journal. This is saving a couple of
syscalls and memory allocations per log message.
assert(n + N_IOVEC_META_FIELDS <= m);
if (ucred) {
assert(n + N_IOVEC_META_FIELDS <= m);
if (ucred) {
uint32_t audit;
uid_t loginuid;
uint32_t audit;
uid_t loginuid;
IOVEC_SET_STRING(iovec[n++], cmdline);
}
IOVEC_SET_STRING(iovec[n++], cmdline);
}
r = audit_session_from_pid(ucred->pid, &audit);
if (r >= 0)
if (asprintf(&audit_session, "_AUDIT_SESSION=%lu", (unsigned long) audit) >= 0)
r = audit_session_from_pid(ucred->pid, &audit);
if (r >= 0)
if (asprintf(&audit_session, "_AUDIT_SESSION=%lu", (unsigned long) audit) >= 0)
if (r >= 0)
if (asprintf(&audit_loginuid, "_AUDIT_LOGINUID=%lu", (unsigned long) loginuid) >= 0)
IOVEC_SET_STRING(iovec[n++], audit_loginuid);
if (r >= 0)
if (asprintf(&audit_loginuid, "_AUDIT_LOGINUID=%lu", (unsigned long) loginuid) >= 0)
IOVEC_SET_STRING(iovec[n++], audit_loginuid);
t = shortened_cgroup_path(ucred->pid);
if (t) {
t = shortened_cgroup_path(ucred->pid);
if (t) {