From b5f776cee9afc14e6c4b945be0576ab3b27e33b7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 11 Jul 2010 04:38:40 +0200 Subject: [PATCH] execute: use right logger socket --- src/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/execute.c b/src/execute.c index 0c2526b33..6363719cd 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; } -- 2.30.2