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

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