Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4661:885bef091d1a HEAD
Make sure we don't kill login processes that haven't yet even sent their
initialization event. Also added another sanity check.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 13 Oct 2006 21:03:22 +0300 |
parents | 60ae03cf7412 |
children | d021f2b0ded2 |
files | src/master/login-process.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/login-process.c Fri Oct 13 20:59:41 2006 +0300 +++ b/src/master/login-process.c Fri Oct 13 21:03:22 2006 +0300 @@ -400,6 +400,12 @@ return; } + if (!p->initialized) { + i_error("login: trying to log in before initialization"); + login_process_destroy(p); + return; + } + fd_close_on_exec(client_fd, TRUE); /* ask the cookie from the auth process */ @@ -732,7 +738,8 @@ /* destroy the oldest listening process. non-listening processes are logged in users who we don't want to kick out because someone's started flooding */ - if (group->oldest_prelogin_process != NULL) + if (group->oldest_prelogin_process != NULL && + group->oldest_prelogin_process->initialized) login_process_destroy(group->oldest_prelogin_process); }