execute: don't pass unit ID in --user mode to journald for stream logging
authorLennart Poettering <lennart@poettering.net>
Fri, 14 Jul 2017 16:59:41 +0000 (18:59 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 31 Jul 2017 16:01:42 +0000 (18:01 +0200)
commitc867611e0a123b81c890c7ee952b2944646d7f91
tree826ab6c351ab638cddf5cb6e5200725770d56500
parent92a17af991c45b96e9fe2095028561f5baf6cab9
execute: don't pass unit ID in --user mode to journald for stream logging

When we create a log stream connection to journald, we pass along the
unit ID. With this change we do this only when we run as system
instance, not as user instance, to remove the ambiguity whether a user
or system unit is specified. The effect of this change is minor:
journald ignores the field anyway from clients with UID != 0. This patch
hence only fixes the unit attribution for the --user instance of the
root user.
src/core/execute.c