const struct auth_settings *global_auth_settings;
-const struct auth_settings *
-auth_settings_read(const char *service,
- struct master_service_settings_output *output_r)
+void auth_settings_read(struct master_service_settings_output *output_r)
{
struct master_service_settings_input input;
const char *error;
i_zero(&input);
- input.service = service;
input.disable_check_settings = TRUE;
if (master_service_settings_read(master_service, &input,
output_r, &error) < 0)
i_fatal("%s", error);
+}
+const struct auth_settings *auth_settings_get(const char *service)
+{
struct event *event = event_create(NULL);
event_add_str(event, "protocol", service);
const struct auth_settings *set =
extern const struct setting_parser_info auth_setting_parser_info;
extern const struct auth_settings *global_auth_settings;
-const struct auth_settings *
-auth_settings_read(const char *service,
- struct master_service_settings_output *output_r)
- ATTR_NULL(1);
+void auth_settings_read(struct master_service_settings_output *output_r);
+const struct auth_settings *auth_settings_get(const char *service);
#endif
const struct mechanisms_register *reg,
const char *const *services)
{
- struct master_service_settings_output set_output;
const struct auth_settings *service_set;
struct auth *auth;
unsigned int i;
}
not_service = services[i];
}
- service_set = auth_settings_read(services[i], &set_output);
+ service_set = auth_settings_get(services[i]);
auth = auth_preinit(service_set, services[i], reg);
array_push_back(&auths, &auth);
}
{
struct master_service_settings_output set_output;
- global_auth_settings = auth_settings_read(NULL, &set_output);
+ auth_settings_read(&set_output);
+ global_auth_settings = auth_settings_get(NULL);
if (set_output.specific_services == NULL)
return t_new(const char *, 1);
return set_output.specific_services;