[dovecot-cvs] dovecot/src/auth auth-request.c,1.80,1.81
tss at dovecot.org
tss at dovecot.org
Wed Jan 24 16:37:46 UTC 2007
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv16436
Modified Files:
auth-request.c
Log Message:
If auth_cache was enabled and userdb returned "user unknown" (typically only
deliver can do that), we crashed.
Index: auth-request.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-request.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- auth-request.c 19 Jan 2007 15:25:34 -0000 1.80
+++ auth-request.c 24 Jan 2007 16:37:43 -0000 1.81
@@ -576,9 +576,10 @@
if (passdb_cache == NULL || userdb->cache_key == NULL)
return;
- str = auth_stream_reply_export(reply);
- auth_cache_insert(passdb_cache, request, userdb->cache_key, str,
- result == PASSDB_RESULT_OK);
+ str = result == USERDB_RESULT_USER_UNKNOWN ? "" :
+ auth_stream_reply_export(reply);
+ /* last_success has no meaning with userdb */
+ auth_cache_insert(passdb_cache, request, userdb->cache_key, str, FALSE);
}
static bool auth_request_lookup_user_cache(struct auth_request *request,
More information about the dovecot-cvs
mailing list