[systemd-devel] [PATCH] analyze/run: Use bus_open_transport_systemd instead of bus_open_transport.

Lennart Poettering lennart at poettering.net
Mon Feb 24 08:10:25 PST 2014


On Fri, 21.02.14 11:55, Thomas Bächler (thomas at archlinux.org) wrote:

> Both systemd-analyze and systemd-run only access org.freedesktop.systemd1
> on the bus. This patch allows using systemd-run --user and systemd-analyze
> --user even if the user session's bus is not properly integrated with the
> systemd user unit.

I am not convinced this is really desirable. The private socket exists
solely to make sure we cann communicate during really early boot and
during late shutdown with it, but neither systemd-analyze nor
systemd-run really appears to be tools that need to support that?

> ---
>  src/analyze/analyze.c | 2 +-
>  src/run/run.c         | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
> index 3d2d08f..37d8beb 100644
> --- a/src/analyze/analyze.c
> +++ b/src/analyze/analyze.c
> @@ -1274,7 +1274,7 @@ int main(int argc, char *argv[]) {
>          if (r <= 0)
>                  goto finish;
>  
> -        r = bus_open_transport(arg_transport, arg_host, arg_user, &bus);
> +        r = bus_open_transport_systemd(arg_transport, arg_host, arg_user, &bus);
>          if (r < 0) {
>                  log_error("Failed to create bus connection: %s", strerror(-r));
>                  goto finish;
> diff --git a/src/run/run.c b/src/run/run.c
> index 885d881..134cb66 100644
> --- a/src/run/run.c
> +++ b/src/run/run.c
> @@ -490,7 +490,7 @@ int main(int argc, char* argv[]) {
>                  arg_description = description;
>          }
>  
> -        r = bus_open_transport(arg_transport, arg_host, arg_user, &bus);
> +        r = bus_open_transport_systemd(arg_transport, arg_host, arg_user, &bus);
>          if (r < 0) {
>                  log_error("Failed to create bus connection: %s", strerror(-r));
>                  goto finish;


Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list