dovecot-2.0: auth: Don't check client PID in non-login auth sock...

dovecot at dovecot.org dovecot at dovecot.org
Wed Mar 21 13:44:48 EET 2012


details:   http://hg.dovecot.org/dovecot-2.0/rev/2fb267a8077a
changeset: 13077:2fb267a8077a
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 21 13:43:56 2012 +0200
description:
auth: Don't check client PID in non-login auth sockets.
This fixes PID conflict errors when using TCP auth sockets for e.g. MTAs.

diffstat:

 src/auth/auth-client-connection.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 2aea8ff5e26f -r 2fb267a8077a src/auth/auth-client-connection.c
--- a/src/auth/auth-client-connection.c	Tue Mar 20 17:46:06 2012 +0200
+++ b/src/auth/auth-client-connection.c	Wed Mar 21 13:43:56 2012 +0200
@@ -94,7 +94,16 @@
 		return FALSE;
 	}
 
-	old = auth_client_connection_lookup(pid);
+	if (conn->login_requests)
+		old = auth_client_connection_lookup(pid);
+	else {
+		/* the client is only authenticating, not logging in.
+		   the PID isn't necessary, and since we allow authentication
+		   via TCP sockets the PIDs may conflict, so ignore them. */
+		old = NULL;
+		pid = 0;
+	}
+
 	if (old != NULL) {
 		/* already exists. it's possible that it just reconnected,
 		   see if the old connection is still there. */


More information about the dovecot-cvs mailing list