X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmachine%2Fmachine-dbus.c;h=9e78a678ef4f0434326b1397adfb236520268309;hb=4cee5eede280b7fd48c18a1942616c4ac896a554;hp=116e711a78f68403d22e758cd394225076c46fbb;hpb=c529695e7a30b300fdaa61ace4a8a4ed0e94ad1c;p=elogind.git diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 116e711a7..9e78a678e 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -21,7 +21,6 @@ #include #include -#include #include /* When we include libgen.h because we need dirname() we immediately @@ -512,7 +511,7 @@ int bus_machine_method_open_login(sd_bus *bus, sd_bus_message *message, void *us #ifdef ENABLE_KDBUS asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT ";x-machine-unix:pid=" PID_FMT, m->leader, m->leader); #else - asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT, m->leader); + asprintf(&container_bus->address, "x-machine-unix:pid=" PID_FMT, m->leader); #endif if (!container_bus->address) return log_oom(); @@ -872,7 +871,7 @@ int bus_machine_method_copy(sd_bus *bus, sd_bus_message *message, void *userdata container_dirname = dirname(t); hostfd = open(host_dirname, O_CLOEXEC|O_RDONLY|O_NOCTTY|O_DIRECTORY); - if (r < 0) + if (hostfd < 0) return sd_bus_error_set_errnof(error, errno, "Failed to open host directory %s: %m", host_dirname); if (pipe2(errno_pipe_fd, O_CLOEXEC|O_NONBLOCK) < 0)