dovecot-2.0: config: Automatically convert old-style auth_cache_...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 8 16:56:20 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/77075d202fc1
changeset: 12088:77075d202fc1
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Sep 08 14:56:15 2010 +0100
description:
config: Automatically convert old-style auth_cache_size value.

diffstat:

 src/config/old-set-parser.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (26 lines):

diff -r 27d235096cca -r 77075d202fc1 src/config/old-set-parser.c
--- a/src/config/old-set-parser.c	Wed Sep 08 14:55:57 2010 +0100
+++ b/src/config/old-set-parser.c	Wed Sep 08 14:56:15 2010 +0100
@@ -269,6 +269,7 @@
 {
 	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 @@
 		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");


More information about the dovecot-cvs mailing list