"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/config/doveconf.c" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

doveconf.c  (dovecot-2.3.16):doveconf.c  (dovecot-2.3.17)
skipping to change at line 79 skipping to change at line 79
case CONFIG_KEY_NORMAL: case CONFIG_KEY_NORMAL:
value = p_strdup_printf(ctx->pool, "%s=%s", key, value); value = p_strdup_printf(ctx->pool, "%s=%s", key, value);
break; break;
case CONFIG_KEY_LIST: case CONFIG_KEY_LIST:
value = p_strdup_printf(ctx->pool, LIST_KEY_PREFIX"%s=%s", value = p_strdup_printf(ctx->pool, LIST_KEY_PREFIX"%s=%s",
key, value); key, value);
break; break;
case CONFIG_KEY_UNIQUE_KEY: case CONFIG_KEY_UNIQUE_KEY:
p = strrchr(key, '/'); p = strrchr(key, '/');
i_assert(p != NULL); i_assert(p != NULL);
value = p_strdup_printf(ctx->pool, "%s/"UNIQUE_KEY_SUFFIX"%s=%s", value = p_strdup_printf(ctx->pool, "%.*s/"UNIQUE_KEY_SUFFIX"%s=%s
t_strdup_until(key, p), p + 1, value); ",
(int)(p - key), key, p + 1, value);
break; break;
case CONFIG_KEY_ERROR: case CONFIG_KEY_ERROR:
value = p_strdup(ctx->pool, value); value = p_strdup(ctx->pool, value);
array_push_back(&ctx->errors, &value); array_push_back(&ctx->errors, &value);
return; return;
} }
array_push_back(&ctx->strings, &value); array_push_back(&ctx->strings, &value);
} }
static int config_string_cmp(const char *const *p1, const char *const *p2) static int config_string_cmp(const char *const *p1, const char *const *p2)
skipping to change at line 156 skipping to change at line 156
ctx->list_prefix = str_new(ctx->pool, 128); ctx->list_prefix = str_new(ctx->pool, 128);
i_array_init(&ctx->strings, 256); i_array_init(&ctx->strings, 256);
i_array_init(&ctx->errors, 256); i_array_init(&ctx->errors, 256);
flags = CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS | flags = CONFIG_DUMP_FLAG_HIDE_LIST_DEFAULTS |
CONFIG_DUMP_FLAG_CALLBACK_ERRORS; CONFIG_DUMP_FLAG_CALLBACK_ERRORS;
if (check_settings) if (check_settings)
flags |= CONFIG_DUMP_FLAG_CHECK_SETTINGS; flags |= CONFIG_DUMP_FLAG_CHECK_SETTINGS;
if (in_section) if (in_section)
flags |= CONFIG_DUMP_FLAG_IN_SECTION; flags |= CONFIG_DUMP_FLAG_IN_SECTION;
ctx->export_ctx = config_export_init(modules, scope, flags, ctx->export_ctx = config_export_init(modules, NULL, scope, flags,
config_request_get_strings, ctx); config_request_get_strings, ctx);
return ctx; return ctx;
} }
static void config_dump_human_deinit(struct config_dump_human_context *ctx) static void config_dump_human_deinit(struct config_dump_human_context *ctx)
{ {
array_free(&ctx->strings); array_free(&ctx->strings);
array_free(&ctx->errors); array_free(&ctx->errors);
pool_unref(&ctx->pool); pool_unref(&ctx->pool);
} }
skipping to change at line 1000 skipping to change at line 1000
i_fatal("%s (copy example configs from "EXAMPLE_CONFIG_DIR"/)", i_fatal("%s (copy example configs from "EXAMPLE_CONFIG_DIR"/)",
error); error);
} }
if ((ret == -1 && exec_args != NULL) || ret == 0 || ret == -2) if ((ret == -1 && exec_args != NULL) || ret == 0 || ret == -2)
i_fatal("%s", error); i_fatal("%s", error);
if (simple_output) { if (simple_output) {
struct config_export_context *ctx; struct config_export_context *ctx;
ctx = config_export_init(wanted_modules, scope, ctx = config_export_init(wanted_modules, NULL, scope,
CONFIG_DUMP_FLAG_CHECK_SETTINGS, CONFIG_DUMP_FLAG_CHECK_SETTINGS,
config_request_simple_stdout, config_request_simple_stdout,
setting_name_filters); setting_name_filters);
config_export_by_filter(ctx, &filter); config_export_by_filter(ctx, &filter);
ret2 = config_export_finish(&ctx); ret2 = config_export_finish(&ctx);
} else if (setting_name_filters != NULL) { } else if (setting_name_filters != NULL) {
ret2 = 0; ret2 = 0;
/* ignore settings-check failures in configuration. this allows /* ignore settings-check failures in configuration. this allows
using doveconf to lookup settings for things like install or using doveconf to lookup settings for things like install or
uninstall scripts where the configuration might uninstall scripts where the configuration might
skipping to change at line 1034 skipping to change at line 1034
printf("# Hostname: %s\n", my_hostdomain()); printf("# Hostname: %s\n", my_hostdomain());
if (!config_path_specified) if (!config_path_specified)
check_wrong_config(config_path); check_wrong_config(config_path);
if (scope == CONFIG_DUMP_SCOPE_ALL_WITHOUT_HIDDEN) if (scope == CONFIG_DUMP_SCOPE_ALL_WITHOUT_HIDDEN)
printf("# NOTE: Send doveconf -n output instead when aski ng for help.\n"); printf("# NOTE: Send doveconf -n output instead when aski ng for help.\n");
fflush(stdout); fflush(stdout);
ret2 = config_dump_human(&filter, wanted_modules, scope, NULL, hi de_passwords); ret2 = config_dump_human(&filter, wanted_modules, scope, NULL, hi de_passwords);
} else { } else {
struct config_export_context *ctx; struct config_export_context *ctx;
ctx = config_export_init(wanted_modules, CONFIG_DUMP_SCOPE_SET, ctx = config_export_init(wanted_modules, NULL, CONFIG_DUMP_SCOPE_ SET,
CONFIG_DUMP_FLAG_CHECK_SETTINGS, CONFIG_DUMP_FLAG_CHECK_SETTINGS,
config_request_putenv, NULL); config_request_putenv, NULL);
config_export_by_filter(ctx, &filter); config_export_by_filter(ctx, &filter);
if (getenv(DOVECOT_PRESERVE_ENVS_ENV) != NULL) { if (getenv(DOVECOT_PRESERVE_ENVS_ENV) != NULL) {
/* Standalone binary is getting its configuration via /* Standalone binary is getting its configuration via
doveconf. Clean the environment before calling it. doveconf. Clean the environment before calling it.
Do this only if the environment exists, because Do this only if the environment exists, because
lib-master doesn't set it if it doesn't want the lib-master doesn't set it if it doesn't want the
environment to be cleaned (e.g. -k parameter). */ environment to be cleaned (e.g. -k parameter). */
 End of changes. 4 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)