From: Lennart Poettering Date: Sun, 11 Jul 2010 02:38:40 +0000 (+0200) Subject: execute: use right logger socket X-Git-Tag: v3~42 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5f776cee9afc14e6c4b945be0576ab3b27e33b7;p=systemd execute: use right logger socket --- diff --git a/src/execute.c b/src/execute.c index 0c2526b3..6363719c 100644 --- a/src/execute.c +++ b/src/execute.c @@ -171,7 +171,7 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons sa.sa.sa_family = AF_UNIX; strncpy(sa.un.sun_path+1, LOGGER_SOCKET, sizeof(sa.un.sun_path)-1); - if (connect(fd, &sa.sa, sizeof(sa)) < 0) { + if (connect(fd, &sa.sa, sizeof(sa_family_t) + 1 + sizeof(LOGGER_SOCKET) - 1) < 0) { close_nointr_nofail(fd); return -errno; }