mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-01 11:16:00 +00:00
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...
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
000f6e5667
commit
1f89214e6e
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user