[dovecot-cvs] dovecot/src/master login-process.c,1.23,1.24

cras at procontrol.fi cras at procontrol.fi
Sun Dec 29 21:44:39 EET 2002


Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv11590

Modified Files:
	login-process.c 
Log Message:
If ssl_disable is set to yes and we get SIGHUPed, don't feed the listening
socket to login processes anymore or they'll just keep dying. We still
don't actually close the socket though..



Index: login-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/login-process.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- login-process.c	19 Dec 2002 23:56:24 -0000	1.23
+++ login-process.c	29 Dec 2002 19:44:37 -0000	1.24
@@ -283,8 +283,13 @@
 	fd_close_on_exec(LOGIN_IMAP_LISTEN_FD, FALSE);
 
 	/* move the SSL listen handle */
-	if (dup2(imaps_fd, LOGIN_IMAPS_LISTEN_FD) < 0)
-		i_fatal("login: dup2(imaps) failed: %m");
+	if (!set_ssl_disable) {
+		if (dup2(imaps_fd, LOGIN_IMAPS_LISTEN_FD) < 0)
+			i_fatal("login: dup2(imaps) failed: %m");
+	} else {
+		if (dup2(null_fd, LOGIN_IMAPS_LISTEN_FD) < 0)
+			i_fatal("login: dup2(imaps) failed: %m");
+	}
 	fd_close_on_exec(LOGIN_IMAPS_LISTEN_FD, FALSE);
 
 	/* imap_fd and imaps_fd are closed by clean_child_process() */




More information about the dovecot-cvs mailing list