[dovecot-cvs] dovecot/src/master login-process.c,1.82,1.83

tss at dovecot.org tss at dovecot.org
Fri Oct 13 19:03:26 UTC 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv29126

Modified Files:
	login-process.c 
Log Message:
Make sure we don't kill login processes that haven't yet even sent their
initialization event. Also added another sanity check.



Index: login-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/login-process.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- login-process.c	12 Oct 2006 09:13:36 -0000	1.82
+++ login-process.c	13 Oct 2006 18:03:22 -0000	1.83
@@ -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);
 	}
 



More information about the dovecot-cvs mailing list