]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: If multiple userdbs are used, default_fields was ignored for all but the first...
authorTimo Sirainen <tss@iki.fi>
Mon, 7 Sep 2015 18:02:51 +0000 (21:02 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 7 Sep 2015 18:02:51 +0000 (21:02 +0300)
src/auth/auth-request.c

index c22a7872a191a3200840958101bdabf6481ac868..6aa1c56c45d4c423527097e5b8f2e385ae2e2471 100644 (file)
@@ -1148,6 +1148,12 @@ void auth_request_lookup_user(struct auth_request *request,
        request->userdb_lookup = TRUE;
        if (request->userdb_reply == NULL)
                auth_request_init_userdb_reply(request);
+       else {
+               /* we still want to set default_fields. these override any
+                  existing fields set by previous userdbs (because if that is
+                  unwanted, ":protected" can be used). */
+               userdb_template_export(userdb->default_fields_tmpl, request);
+       }
 
        /* (for now) auth_cache is shared between passdb and userdb */
        cache_key = passdb_cache == NULL ? NULL : userdb->cache_key;