dovecot-2.2: auth: Don't crash with "doveadm auth cache flush" w...

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 23 11:40:34 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/9c347c7faaf2
changeset: 16865:9c347c7faaf2
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 23 11:40:26 2013 +0300
description:
auth: Don't crash with "doveadm auth cache flush" when cache is disabled.

diffstat:

 src/auth/auth-master-connection.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 10f3030047b6 -r 9c347c7faaf2 src/auth/auth-master-connection.c
--- a/src/auth/auth-master-connection.c	Wed Oct 23 11:38:07 2013 +0300
+++ b/src/auth/auth-master-connection.c	Wed Oct 23 11:40:26 2013 +0300
@@ -147,7 +147,10 @@
 		return FALSE;
 	}
 
-	if (list[1] == NULL) {
+	if (passdb_cache == NULL) {
+		/* cache disabled */
+		count = 0;
+	} if (list[1] == NULL) {
 		/* flush the whole cache */
 		count = auth_cache_clear(passdb_cache);
 	} else {


More information about the dovecot-cvs mailing list