"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-master/master-service-settings.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.

master-service-settings.c  (dovecot-2.3.16):master-service-settings.c  (dovecot-2.3.17)
skipping to change at line 226 skipping to change at line 226
if (input->module != NULL) { if (input->module != NULL) {
strarr_push(&conf_argv, "-m"); strarr_push(&conf_argv, "-m");
strarr_push(&conf_argv, input->module); strarr_push(&conf_argv, input->module);
} }
if (input->extra_modules != NULL) { if (input->extra_modules != NULL) {
for (unsigned int i = 0; input->extra_modules[i] != NULL; i++) { for (unsigned int i = 0; input->extra_modules[i] != NULL; i++) {
strarr_push(&conf_argv, "-m"); strarr_push(&conf_argv, "-m");
strarr_push(&conf_argv, input->extra_modules[i]); strarr_push(&conf_argv, input->extra_modules[i]);
} }
} }
if (service->want_ssl_settings && if (input->module != NULL || input->extra_modules != NULL) {
(input->module != NULL || input->extra_modules != NULL)) {
strarr_push(&conf_argv, "-m"); strarr_push(&conf_argv, "-m");
strarr_push(&conf_argv, "ssl"); if (service->want_ssl_server)
strarr_push(&conf_argv, "ssl-server");
else
strarr_push(&conf_argv, "ssl");
} }
if (input->parse_full_config) if (input->parse_full_config)
strarr_push(&conf_argv, "-p"); strarr_push(&conf_argv, "-p");
strarr_push(&conf_argv, "-e"); strarr_push(&conf_argv, "-e");
strarr_push(&conf_argv, binary_path); strarr_push(&conf_argv, binary_path);
array_append(&conf_argv, (const char *const *)service->argv + 1, array_append(&conf_argv, (const char *const *)service->argv + 1,
service->argc); service->argc);
array_append_zero(&conf_argv); array_append_zero(&conf_argv);
skipping to change at line 360 skipping to change at line 362
config_build_request(struct master_service *service, string_t *str, config_build_request(struct master_service *service, string_t *str,
const struct master_service_settings_input *input) const struct master_service_settings_input *input)
{ {
str_append(str, "REQ"); str_append(str, "REQ");
if (input->module != NULL) if (input->module != NULL)
str_printfa(str, "\tmodule=%s", input->module); str_printfa(str, "\tmodule=%s", input->module);
if (input->extra_modules != NULL) { if (input->extra_modules != NULL) {
for (unsigned int i = 0; input->extra_modules[i] != NULL; i++) for (unsigned int i = 0; input->extra_modules[i] != NULL; i++)
str_printfa(str, "\tmodule=%s", input->extra_modules[i]); str_printfa(str, "\tmodule=%s", input->extra_modules[i]);
} }
if (service->want_ssl_settings && if (input->module != NULL || input->extra_modules != NULL) {
(input->module != NULL || input->extra_modules != NULL)) str_printfa(str, "\tmodule=%s",
str_append(str, "\tmodule=ssl"); service->want_ssl_server ? "ssl-server" : "ssl");
}
if (input->no_ssl_ca)
str_append(str, "\texclude=ssl_ca\texclude=ssl_verify_client_cert
");
if (input->service != NULL) if (input->service != NULL)
str_printfa(str, "\tservice=%s", input->service); str_printfa(str, "\tservice=%s", input->service);
if (input->username != NULL) if (input->username != NULL)
str_printfa(str, "\tuser=%s", input->username); str_printfa(str, "\tuser=%s", input->username);
if (input->local_ip.family != 0) if (input->local_ip.family != 0)
str_printfa(str, "\tlip=%s", net_ip2addr(&input->local_ip)); str_printfa(str, "\tlip=%s", net_ip2addr(&input->local_ip));
if (input->remote_ip.family != 0) if (input->remote_ip.family != 0)
str_printfa(str, "\trip=%s", net_ip2addr(&input->remote_ip)); str_printfa(str, "\trip=%s", net_ip2addr(&input->remote_ip));
if (input->local_name != NULL) if (input->local_name != NULL)
str_printfa(str, "\tlname=%s", input->local_name); str_printfa(str, "\tlname=%s", input->local_name);
skipping to change at line 609 skipping to change at line 614
settings_parser_deinit(&service->set_parser); settings_parser_deinit(&service->set_parser);
p_clear(service->set_pool); p_clear(service->set_pool);
} else { } else {
service->set_pool = service->set_pool =
pool_alloconly_create("master service settings", 16384); pool_alloconly_create("master service settings", 16384);
} }
p_array_init(&all_roots, service->set_pool, 8); p_array_init(&all_roots, service->set_pool, 8);
tmp_root = &master_service_setting_parser_info; tmp_root = &master_service_setting_parser_info;
array_push_back(&all_roots, &tmp_root); array_push_back(&all_roots, &tmp_root);
if (service->want_ssl_settings) { tmp_root = &master_service_ssl_setting_parser_info;
tmp_root = &master_service_ssl_setting_parser_info; array_push_back(&all_roots, &tmp_root);
if (service->want_ssl_server) {
tmp_root = &master_service_ssl_server_setting_parser_info;
array_push_back(&all_roots, &tmp_root); array_push_back(&all_roots, &tmp_root);
} }
if (input->roots != NULL) { if (input->roots != NULL) {
for (i = 0; input->roots[i] != NULL; i++) for (i = 0; input->roots[i] != NULL; i++)
array_push_back(&all_roots, &input->roots[i]); array_push_back(&all_roots, &input->roots[i]);
} }
parser = settings_parser_init_list(service->set_pool, parser = settings_parser_init_list(service->set_pool,
array_front(&all_roots), array_count(&all_roots), array_front(&all_roots), array_count(&all_roots),
SETTINGS_PARSER_FLAG_IGNORE_UNKNOWN_KEYS); SETTINGS_PARSER_FLAG_IGNORE_UNKNOWN_KEYS);
skipping to change at line 759 skipping to change at line 766
void **master_service_settings_get_others(struct master_service *service) void **master_service_settings_get_others(struct master_service *service)
{ {
return master_service_settings_parser_get_others(service, return master_service_settings_parser_get_others(service,
service->set_parser); service->set_parser);
} }
void **master_service_settings_parser_get_others(struct master_service *service, void **master_service_settings_parser_get_others(struct master_service *service,
const struct setting_parser_cont ext *set_parser) const struct setting_parser_cont ext *set_parser)
{ {
return settings_parser_get_list(set_parser) + 1 + return settings_parser_get_list(set_parser) + 2 +
(service->want_ssl_settings ? 1 : 0); (service->want_ssl_server ? 1 : 0);
} }
struct setting_parser_context * struct setting_parser_context *
master_service_get_settings_parser(struct master_service *service) master_service_get_settings_parser(struct master_service *service)
{ {
return service->set_parser; return service->set_parser;
} }
int master_service_set(struct master_service *service, const char *line) int master_service_set(struct master_service *service, const char *line)
{ {
 End of changes. 5 change blocks. 
10 lines changed or deleted 18 lines changed or added

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