chiark / gitweb /
analyze/run: use bus_open_transport_systemd instead of bus_open_transport
authorThomas Bächler <thomas@archlinux.org>
Fri, 21 Feb 2014 10:55:24 +0000 (11:55 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 26 May 2014 18:21:53 +0000 (14:21 -0400)
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.

https://bugs.freedesktop.org/show_bug.cgi?id=79252 and other reports...

src/analyze/analyze.c
src/run/run.c

index 4c5fcfe8c2eb6510c4ec3aa06e416579123c8d3d..0a4190ceb4e7d995023b76400ebd0c73c04ca42a 100644 (file)
@@ -1335,7 +1335,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;
index e4c695c5b505f08dcecc050c92c3236b2bb6d872..9d5527b29c6cf209b6e12ac7a0b4dc66d16a4327 100644 (file)
@@ -593,7 +593,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;