auth-settings.c revision 373492be949e159fda651807b3acda2c5c077027
/* Copyright (c) 2005-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "settings-parser.h"
#include "master-service-settings.h"
#include "service-settings.h"
#include "auth-settings.h"
#include <stddef.h>
extern const struct setting_parser_info auth_setting_parser_info;
extern const struct setting_parser_info auth_root_setting_parser_info;
/* <settings checks> */
static struct file_listener_settings auth_unix_listeners_array[] = {
{ "auth-client", 0600, "", "" },
{ "auth-userdb", 0600, "", "" },
{ "auth-master", 0600, "", "" }
};
static struct file_listener_settings *auth_unix_listeners[] = {
};
static buffer_t auth_unix_listeners_buf = {
auth_unix_listeners, sizeof(auth_unix_listeners), { 0, }
};
/* </settings checks> */
struct service_settings auth_service_settings = {
.name = "auth",
.protocol = "",
.type = "",
.executable = "auth",
.user = "",
.group = "",
.privileged_group = "",
.extra_groups = "",
.chroot = "",
.process_min_avail = 0,
.process_limit = 1,
.client_limit = 0,
.service_count = 0,
.vsz_limit = -1U,
.unix_listeners = { { &auth_unix_listeners_buf,
sizeof(auth_unix_listeners[0]) } },
};
/* <settings checks> */
static struct file_listener_settings auth_worker_unix_listeners_array[] = {
{ "auth-worker", 0600, "", "" }
};
static struct file_listener_settings *auth_worker_unix_listeners[] = {
};
static buffer_t auth_worker_unix_listeners_buf = {
auth_worker_unix_listeners, sizeof(auth_worker_unix_listeners), { 0, }
};
/* </settings checks> */
struct service_settings auth_worker_service_settings = {
.name = "auth-worker",
.protocol = "",
.type = "",
.executable = "auth -w",
.user = "",
.group = "",
.privileged_group = "",
.extra_groups = "",
.chroot = "",
.process_min_avail = 0,
.process_limit = 0,
.client_limit = 1,
.service_count = 0,
.vsz_limit = -1U,
sizeof(auth_worker_unix_listeners[0]) } },
};
static const struct setting_define auth_passdb_setting_defines[] = {
};
const struct setting_parser_info auth_passdb_setting_parser_info = {
.struct_size = sizeof(struct auth_passdb_settings),
};
static const struct setting_define auth_userdb_setting_defines[] = {
};
const struct setting_parser_info auth_userdb_setting_parser_info = {
.struct_size = sizeof(struct auth_userdb_settings),
};
/* we're kind of kludging here to avoid "auth_" prefix in the struct fields */
static const struct setting_define auth_setting_defines[] = {
};
static const struct auth_settings auth_default_settings = {
.mechanisms = "plain",
.realms = "",
.default_realm = "",
.cache_size = 0,
.cache_negative_ttl = 0,
.username_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@",
.username_translation = "",
.username_format = "",
.master_user_separator = "",
.anonymous_username = "anonymous",
.krb5_keytab = "",
.gssapi_hostname = "",
.winbind_helper_path = "/usr/bin/ntlm_auth",
.failure_delay = 2,
.debug_passwords = FALSE,
.verbose_passwords = "no:plain:sha1",
.use_winbind = FALSE,
.worker_max_count = 30,
.passdbs = ARRAY_INIT,
};
const struct setting_parser_info auth_setting_parser_info = {
.module_name = "auth",
.struct_size = sizeof(struct auth_settings),
};
/* <settings checks> */
const char **error_r ATTR_UNUSED)
{
if (set->debug_passwords)
return TRUE;
}
static bool
const char **error_r)
{
*error_r = "passdb is missing driver";
return FALSE;
}
return TRUE;
}
static bool
const char **error_r)
{
*error_r = "userdb is missing driver";
return FALSE;
}
return TRUE;
}
/* </settings checks> */
struct auth_settings *
{
static const struct setting_parser_info *set_roots[] = {
};
const char *error;
void **sets;
return sets[0];
}