chiark / gitweb /
sd-bus: cleanup ssh sessions (Closes: #8076)
authorShawn Landden <slandden@gmail.com>
Sat, 3 Feb 2018 18:16:33 +0000 (10:16 -0800)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:58:50 +0000 (07:58 +0200)
commit4ea9b5737fb009441667734864a08031152c671e
tree2e2ea252bc6dc2d554c7fb857929329ca0e8b726
parentc204e302a5b8c276e846c0e36a746b12e8a16a8e
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/libelogind/sd-bus/sd-bus.c