Mercurial > dovecot > original-hg > dovecot-1.2
changeset 876:ad8f7d2107b4 HEAD
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..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 29 Dec 2002 21:44:37 +0200 |
parents | 969bdb985a03 |
children | 7935347f54f1 |
files | src/master/login-process.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/login-process.c Sun Dec 29 21:36:41 2002 +0200 +++ b/src/master/login-process.c Sun Dec 29 21:44:37 2002 +0200 @@ -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() */