]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't fail with auth_cache_size=0
authorTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 13:58:31 +0000 (14:58 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 8 Sep 2010 13:58:31 +0000 (14:58 +0100)
src/auth/auth-settings.c
src/config/old-set-parser.c

index 6911757631e5d7063970c35916e8bb0a23ba1c20..9be4257392ad728c09d02d258d88230cbf5ced04 100644 (file)
@@ -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 "
index fcdbff329b8b2ca590bb9c93b87ef6da2bd8d722..78d4817a3b5969d830ea5da5da2c39374d989738 100644 (file)
@@ -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,