changeset 13796:c067025026ed

auth: Fixed vpopmail to work again after recent change.
author Timo Sirainen <tss@iki.fi>
date Fri, 02 Dec 2011 23:47:01 +0200
parents 092d55003a7b
children 272b705f0938
files src/auth/passdb-vpopmail.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/passdb-vpopmail.c	Fri Dec 02 17:59:24 2011 +0200
+++ b/src/auth/passdb-vpopmail.c	Fri Dec 02 23:47:01 2011 +0200
@@ -75,7 +75,8 @@
 		password = NULL;
 		*result_r = PASSDB_RESULT_USER_DISABLED;
 	} else {
-		if (vpw->pw_clear_passwd != NULL) {
+		if (vpw->pw_clear_passwd != NULL &&
+		    *vpw->pw_clear_passwd != '\0') {
 			password = t_strdup_noconst(vpw->pw_clear_passwd);
 			*cleartext = TRUE;
 		} else if (!*cleartext)
@@ -120,7 +121,7 @@
 	enum passdb_result result;
 	const char *scheme, *tmp_pass;
 	char *crypted_pass;
-	bool cleartext;
+	bool cleartext = FALSE;
 	int ret;
 
 	crypted_pass = vpopmail_password_lookup(request, &cleartext, &result);