dovecot-2.0: passdb vpopmail: Always prefer to lookup plaintext ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Oct 2 20:18:31 EEST 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/dbd5f9ec38af
changeset: 12945:dbd5f9ec38af
user: Timo Sirainen <tss at iki.fi>
date: Sun Oct 02 20:26:02 2011 +0300
description:
passdb vpopmail: Always prefer to lookup plaintext password if it exists.
This is important when multiple auth mechanisms are used and the password is
cached.
diffstat:
src/auth/passdb-vpopmail.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r dd6460d046e7 -r dbd5f9ec38af src/auth/passdb-vpopmail.c
--- a/src/auth/passdb-vpopmail.c Sun Oct 02 16:32:59 2011 +0300
+++ b/src/auth/passdb-vpopmail.c Sun Oct 02 20:26:02 2011 +0300
@@ -75,8 +75,12 @@
password = NULL;
*result_r = PASSDB_RESULT_USER_DISABLED;
} else {
- password = t_strdup_noconst(cleartext ? vpw->pw_clear_passwd :
- vpw->pw_passwd);
+ if (vpw->pw_clear_passwd != NULL)
+ password = t_strdup_noconst(vpw->pw_clear_passwd);
+ else if (!cleartext)
+ password = t_strdup_noconst(vpw->pw_passwd);
+ else
+ password = NULL;
*result_r = password != NULL ? PASSDB_RESULT_OK :
PASSDB_RESULT_SCHEME_NOT_AVAILABLE;
}
More information about the dovecot-cvs
mailing list