diff options
author | Simon McVittie <smcv@collabora.com> | 2018-03-20 12:33:51 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-03-22 19:25:16 +0000 |
commit | 66246fff2a0bd005817fb9d108544da86973a81e (patch) | |
tree | 992904095f75b30ab74ea56cde64a91bd7c7eb60 | |
parent | b6b3348596cf1c8cba1336596ca042d1a3af417d (diff) | |
download | dbus-66246fff2a0bd005817fb9d108544da86973a81e.tar.gz |
bus: Clear INVOCATION_ID when carrying out traditional activation
We weren't sure whether this one should be inherited or not, so I
asked on systemd-devel, and Lennart thought it shouldn't.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=104641
Reviewed-by: Philip Withnall <withnall@endlessm.com>
-rw-r--r-- | bus/activation.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bus/activation.c b/bus/activation.c index 66640ba6..2a427d9c 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -862,7 +862,6 @@ populate_environment (BusActivation *activation) * - TERM, WATCHDOG_*: Should not be set for dbus-daemon, so not applicable * - MAINPID, SERVICE_RESULT, EXIT_CODE, EXIT_STATUS: Not set for ExecStart, * so not applicable - * - INVOCATION_ID: TODO: Do we want to clear this or not? It isn't clear. */ /* We give activated services their own Journal stream to avoid their @@ -878,6 +877,13 @@ populate_environment (BusActivation *activation) * (and NotifyAccess wouldn't let it write here anyway) */ _dbus_hash_table_remove_string (activation->environment, "NOTIFY_SOCKET"); + /* This identifies the dbus-daemon invocation. Whether it should be + * inherited by "smaller" services isn't entirely clear-cut, but not + * inheriting it makes traditional D-Bus activation under systemd a + * little more consistent with systemd activation. + * https://lists.freedesktop.org/archives/systemd-devel/2018-March/040467.html */ + _dbus_hash_table_remove_string (activation->environment, "INVOCATION_ID"); + return retval; } |