[dovecot-cvs] dovecot/src/auth auth-request.c,1.52,1.53

cras at dovecot.org cras at dovecot.org
Sat Apr 8 11:44:13 EEST 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv28600

Modified Files:
	auth-request.c 
Log Message:
If master login username is the same as the normal username, we don't want
to treat it as master user. Fixes authentication with some clients.



Index: auth-request.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- auth-request.c	27 Mar 2006 12:54:24 -0000	1.52
+++ auth-request.c	8 Apr 2006 08:44:11 -0000	1.53
@@ -608,7 +608,12 @@
 
         request->requested_login_user =
                 auth_request_fix_username(request, username, error_r);
-        return request->requested_login_user != NULL;
+	if (strcmp(request->requested_login_user, request->user) == 0) {
+		/* The usernames are the same, we don't really wish to log
+		   in as someone else */
+		request->requested_login_user = NULL;
+	}
+	return request->requested_login_user != NULL;
 }
 
 static int is_ip_in_network(const char *network, const struct ip_addr *ip)



More information about the dovecot-cvs mailing list