dovecot-2.2: auth: Fixed handling userdb_userdb_import passdb ex...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 13 07:26:33 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/87da927c3c19
changeset: 17485:87da927c3c19
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 13 10:25:22 2014 +0300
description:
auth: Fixed handling userdb_userdb_import passdb extra field.
Looks like some hg merging went wrong.
Found by Coverity

diffstat:

 src/auth/auth-request.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (33 lines):

diff -r 368b8af23c3f -r 87da927c3c19 src/auth/auth-request.c
--- a/src/auth/auth-request.c	Fri Jun 13 10:22:49 2014 +0300
+++ b/src/auth/auth-request.c	Fri Jun 13 10:25:22 2014 +0300
@@ -1434,6 +1434,14 @@
 		request->userdb_prefetch_set = TRUE;
 		if (request->userdb_reply == NULL)
 			auth_request_init_userdb_reply(request);
+		if (strcmp(name, "userdb_userdb_import") == 0) {
+			/* we can't put the whole userdb_userdb_import
+			   value to extra_cache_fields or it doesn't work
+			   properly. so handle this explicitly. */
+			auth_request_passdb_import(request, value,
+						   "userdb_", default_scheme);
+			return;
+		}
 		auth_request_set_userdb_field(request, name + 7, value);
 	} else if (strcmp(name, "nopassword") == 0) {
 		/* NULL password - anything goes */
@@ -1454,14 +1462,6 @@
 	} else if (strcmp(name, "passdb_import") == 0) {
 		auth_request_passdb_import(request, value, "", default_scheme);
 		return;
-		if (strcmp(name, "userdb_userdb_import") == 0) {
-			/* we need can't put the whole userdb_userdb_import
-			   value to extra_cache_fields or it doesn't work
-			   properly. so handle this explicitly. */
-			auth_request_passdb_import(request, value,
-						   "userdb_", default_scheme);
-			return;
-		}
 	} else {
 		/* these fields are returned to client */
 		auth_fields_add(request->extra_fields, name, value, 0);


More information about the dovecot-cvs mailing list