From 6bd263caf006edc75205f446fa0283c6f364941b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 8 Sep 2010 14:58:31 +0100 Subject: [PATCH] Don't fail with auth_cache_size=0 --- src/auth/auth-settings.c | 2 +- src/config/old-set-parser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, -- 2.47.3