diff options
author | Mirco Tischler <mt-ml@gmx.de> | 2013-01-17 18:55:05 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-18 11:14:00 -0500 |
commit | ef1673d16907726d83bdff2e57b5261997a85020 (patch) | |
tree | 279fb9130247928bc23a63aae0159fbf73a59544 /src/journal/journald-server.c | |
parent | b9893505636b77878035b342026e391e10cfbb91 (diff) |
journal: log _SYSTEMD_USER_UNIT for user session units
Diffstat (limited to 'src/journal/journald-server.c')
-rw-r--r-- | src/journal/journald-server.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index ec9be65575..12a46e6bd0 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -601,8 +601,15 @@ static void dispatch_message_real( if (cg_pid_get_unit(ucred->pid, &t) >= 0) { unit = strappend("_SYSTEMD_UNIT=", t); free(t); - } else if (unit_id) - unit = strappend("_SYSTEMD_UNIT=", unit_id); + } else if (cg_pid_get_user_unit(ucred->pid, &t) >= 0) { + unit = strappend("_SYSTEMD_USER_UNIT=", t); + free(t); + } else if (unit_id) { + if (session) + unit = strappend("_SYSTEMD_USER_UNIT=", unit_id); + else + unit = strappend("_SYSTEMD_UNIT=", unit_id); + } if (unit) IOVEC_SET_STRING(iovec[n++], unit); |