X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=blobdiff_plain;f=src%2Fimport%2Fimportd.c;h=975907e3c922d9f3efca32af6eff840fad0860ce;hp=ffff94ee721beafee1ed3b7c3121a7d0182d2e8c;hb=6bedfcbb2970e06a4d3280c8fb62083d252ede73;hpb=25b31f2fbdc4866433e675ff5dd3073f4d56cf08 diff --git a/src/import/importd.c b/src/import/importd.c index ffff94ee721..975907e3c92 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -22,20 +22,23 @@ #include #include "sd-bus.h" -#include "util.h" -#include "strv.h" -#include "bus-util.h" + #include "bus-common-errors.h" -#include "socket-util.h" -#include "mkdir.h" +#include "bus-util.h" #include "def.h" -#include "missing.h" +#include "fd-util.h" +#include "hostname-util.h" +#include "import-util.h" #include "machine-pool.h" +#include "missing.h" +#include "mkdir.h" +#include "parse-util.h" #include "path-util.h" -#include "import-util.h" #include "process-util.h" #include "signal-util.h" -#include "hostname-util.h" +#include "socket-util.h" +#include "strv.h" +#include "util.h" typedef struct Transfer Transfer; typedef struct Manager Manager; @@ -167,6 +170,7 @@ static int transfer_new(Manager *m, Transfer **ret) { t->type = _TRANSFER_TYPE_INVALID; t->log_fd = -1; t->stdin_fd = -1; + t->stdout_fd = -1; t->verify = _IMPORT_VERIFY_INVALID; id = m->current_transfer_id + 1; @@ -599,14 +603,11 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void cmsg_close_all(&msghdr); - CMSG_FOREACH(cmsg, &msghdr) { + CMSG_FOREACH(cmsg, &msghdr) if (cmsg->cmsg_level == SOL_SOCKET && - cmsg->cmsg_type == SCM_CREDENTIALS && - cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) { - + cmsg->cmsg_type == SCM_CREDENTIALS && + cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) ucred = (struct ucred*) CMSG_DATA(cmsg); - } - } if (msghdr.msg_flags & MSG_TRUNC) { log_warning("Got overly long notification datagram, ignoring.");