From: Timo Sirainen Date: Wed, 8 Sep 2010 13:56:15 +0000 (+0100) Subject: config: Automatically convert old-style auth_cache_size value. X-Git-Tag: 2.0.2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ce40a7370a19a98caeca5d2e27b3d6c77c90ea9;p=thirdparty%2Fdovecot%2Fcore.git config: Automatically convert old-style auth_cache_size value. --- diff --git a/src/config/old-set-parser.c b/src/config/old-set-parser.c index d602009a78..fcdbff329b 100644 --- a/src/config/old-set-parser.c +++ b/src/config/old-set-parser.c @@ -269,6 +269,7 @@ old_settings_handle_proto(struct config_parser_context *ctx, { struct config_section_stack *old_section = ctx->cur_section; const char *p; + uoff_t size; bool root; while (ctx->cur_section->prev != NULL) @@ -407,6 +408,14 @@ old_settings_handle_proto(struct config_parser_context *ctx, config_apply_auth_set(ctx, key, "chroot", value); return TRUE; } + if (strcmp(key, "auth_cache_size") == 0 && + str_to_uoff(value, &size) == 0 && size < 1024) { + obsolete(ctx, "auth_cache_size value no longer defaults to " + "megabytes. Use %sM", value); + config_apply_line(ctx, key, + t_strdup_printf("%s=%sM", key, value), NULL); + return TRUE; + } if (strcmp(key, "auth_count") == 0) { if (strcmp(value, "count") == 0) obsolete(ctx, "auth_count has been removed");