Blame SOURCES/dovecot-2.3.13-CVE_2020_24386-part2.patch

27f02a
From 73937b5fe7eb1dde76f30ef6b181c920bbbc4558 Mon Sep 17 00:00:00 2001
27f02a
From: Timo Sirainen <timo.sirainen@open-xchange.com>
27f02a
Date: Mon, 24 Aug 2020 16:58:16 +0300
27f02a
Subject: [PATCH] imap: Fix crash if imap-hibernate socket can't be connected
27f02a
 to
27f02a
27f02a
The error was supposed to be returned to caller, not logged directly.
27f02a
---
27f02a
 src/imap/imap-client-hibernate.c | 3 ++-
27f02a
 1 file changed, 2 insertions(+), 1 deletion(-)
27f02a
27f02a
diff --git a/src/imap/imap-client-hibernate.c b/src/imap/imap-client-hibernate.c
27f02a
index 4ef323453c..d3451b1bf6 100644
27f02a
--- a/src/imap/imap-client-hibernate.c
27f02a
+++ b/src/imap/imap-client-hibernate.c
27f02a
@@ -176,7 +176,8 @@ imap_hibernate_process_send(struct client *client, const buffer_t *state,
27f02a
 			   "/"IMAP_HIBERNATE_SOCKET_NAME, NULL);
27f02a
 	fd = net_connect_unix_with_retries(path, 1000);
27f02a
 	if (fd == -1) {
27f02a
-		i_error("net_connect_unix(%s) failed: %m", path);
27f02a
+		*error_r = t_strdup_printf(
27f02a
+			"net_connect_unix(%s) failed: %m", path);
27f02a
 		return -1;
27f02a
 	}
27f02a
 	net_set_nonblock(fd, FALSE);