Mercurial > dovecot > original-hg > dovecot-1.2
diff src/auth/passdb-blocking.c @ 6436:fd7ffed49763 HEAD
Transfer also userdb information from blocking passdb workers, so prefetch
doesn't break with auth cache.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 17 Sep 2007 11:15:50 +0300 |
parents | 65c69a53a7be |
children | 7ed926ed7aa4 |
line wrap: on
line diff
--- a/src/auth/passdb-blocking.c Mon Sep 17 10:41:00 2007 +0300 +++ b/src/auth/passdb-blocking.c Mon Sep 17 11:15:50 2007 +0300 @@ -39,11 +39,17 @@ return PASSDB_RESULT_OK; } - if (strcmp(*args, "FAIL") == 0 && args[1] != NULL && args[2] != NULL) { - /* FAIL \t result \t password [\t extra] */ + if (strcmp(*args, "FAIL") == 0 && args[1] != NULL) { + /* FAIL \t result [\t user \t password [\t extra]] */ ret = atoi(args[1]); - if (ret != PASSDB_RESULT_OK) { - auth_worker_reply_parse_args(request, args + 2); + if (ret == PASSDB_RESULT_OK) { + /* shouldn't happen */ + } else if (args[2] == NULL) { + /* internal failure most likely */ + return ret; + } else if (args[3] != NULL) { + auth_request_set_field(request, "user", args[2], NULL); + auth_worker_reply_parse_args(request, args + 3); return ret; } }