From: Timo Sirainen Date: Wed, 8 Sep 2010 13:58:31 +0000 (+0100) Subject: Don't fail with auth_cache_size=0 X-Git-Tag: 2.0.2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6bd263caf006edc75205f446fa0283c6f364941b;p=thirdparty%2Fdovecot%2Fcore.git Don't fail with auth_cache_size=0 --- diff --git a/src/auth/auth-settings.c b/src/auth/auth-settings.c index 6911757631..9be4257392 100644 --- a/src/auth/auth-settings.c +++ b/src/auth/auth-settings.c @@ -266,7 +266,7 @@ static bool auth_settings_check(void *_set, pool_t pool, if (set->debug) set->verbose = TRUE; - if (set->cache_size < 1024) { + if (set->cache_size > 0 && set->cache_size < 1024) { /* probably a configuration error. older versions used megabyte numbers */ *error_r = t_strdup_printf("auth_cache_size value is too small " diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index fcdbff329b..78d4817a3b 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -409,7 +409,7 @@ old_settings_handle_proto(struct config_parser_context *ctx, return TRUE; } if (strcmp(key, "auth_cache_size") == 0 && - str_to_uoff(value, &size) == 0 && size < 1024) { + str_to_uoff(value, &size) == 0 && size > 0 && size < 1024) { obsolete(ctx, "auth_cache_size value no longer defaults to " "megabytes. Use %sM", value); config_apply_line(ctx, key,