summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2014-02-21 11:55:24 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-05-26 14:21:53 -0400
commit1f89214e6e990a0b552f6854f87f8514ca384956 (patch)
tree02ea199088b3322def5b5ad7057ff7f8b626a78c
parent000f6e5667eb4f73e137cbd0d7395a9f9db7728a (diff)
analyze/run: use bus_open_transport_systemd instead of bus_open_transport
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...
-rw-r--r--src/analyze/analyze.c2
-rw-r--r--src/run/run.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 4c5fcfe8c..0a4190ceb 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -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;
diff --git a/src/run/run.c b/src/run/run.c
index e4c695c5b..9d5527b29 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -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;