]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: cleanup ssh sessions (Closes: #8076) 8083/head
authorShawn Landden <slandden@gmail.com>
Sat, 3 Feb 2018 18:16:33 +0000 (10:16 -0800)
committerShawn Landden <slandden@gmail.com>
Thu, 8 Feb 2018 18:14:48 +0000 (10:14 -0800)
commit392cf1d05dbfa1395f6d99102e5ea41debb58fec
treebce8bd83f2f4c137e61c02315ac62f2509579d0a
parentade681a86168de685aded6fa90400c3affe6703f
sd-bus: cleanup ssh sessions (Closes: #8076)

we still invoke ssh unnecessarily when there in incompatible or erreneous input
The fallow-up to finish that would make the code a bit more verbose,
as it would require repeating this bit:
```
        r = bus_connect_transport(arg_transport, arg_host, false, &bus);
        if (r < 0) {
                log_error_errno(r, "Failed to create bus connection: %m");
                goto finish;
        }

        sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
```
in every verb, after parsing.

v2: add waitpid() to avoid a zombie process, switch to SIGTERM from SIGKILL
v3: refactor, wait in bus_start_address()
src/basic/process-util.c
src/basic/process-util.h
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/bus-socket.c
src/libsystemd/sd-bus/sd-bus.c