stdio-bridge: add support for --system and --user
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Dec 2020 12:23:31 +0000 (13:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Dec 2020 17:01:20 +0000 (18:01 +0100)
commitcedfd142dea105b37223ad24d784494bfae83dc5
treeba6794acfc4da11f486fb87c1bf40d6b14a170b5
parentba4a31b7a61cc730b7cbc10948d4f1d6d78d93c7
stdio-bridge: add support for --system and --user

So far, the bridge always acted as if "--system" was used, i.e. would
unconditionally connect to the system bus. Let's add "--user" too, to
connect to the users session bus.

This is mostly for completeness' sake.

I wanted to use this when making sd-bus's ability to connect to other
user's D-Bus busses work, but it didn't exist so far. In the interest of
keeping things compatible the implementation in sd-bus will not use the
new "--user" switch, and instead manually construct the right bus path
via "--path=", but we still should add the proper switches, as
preparation for a brighter future, one day.
src/stdio-bridge/stdio-bridge.c