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

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