auth-settings.c revision 317689976ad393ab9eb78e7d9399fe3d899912ad
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen/* Copyright (c) 2005-2017 Dovecot authors, see the included COPYING file */
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic bool auth_settings_check(void *_set, pool_t pool, const char **error_r);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic bool auth_passdb_settings_check(void *_set, pool_t pool, const char **error_r);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic bool auth_userdb_settings_check(void *_set, pool_t pool, const char **error_r);
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen/* <settings checks> */
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic struct file_listener_settings auth_unix_listeners_array[] = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen { "auth-login", 0600, "$default_internal_user", "" },
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen { "auth-client", 0600, "$default_internal_user", "" },
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen { "auth-userdb", 0666, "$default_internal_user", "" },
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic struct file_listener_settings *auth_unix_listeners[] = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen auth_unix_listeners, sizeof(auth_unix_listeners), { NULL, }
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen/* </settings checks> */
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstruct service_settings auth_service_settings = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen .unix_listeners = { { &auth_unix_listeners_buf,
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen/* <settings checks> */
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic struct file_listener_settings auth_worker_unix_listeners_array[] = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen { "auth-worker", 0600, "$default_internal_user", "" }
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic struct file_listener_settings *auth_worker_unix_listeners[] = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic buffer_t auth_worker_unix_listeners_buf = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen auth_worker_unix_listeners, sizeof(auth_worker_unix_listeners), { NULL, }
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen/* </settings checks> */
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstruct service_settings auth_worker_service_settings = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen .unix_listeners = { { &auth_worker_unix_listeners_buf,
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen { type, #name, offsetof(struct auth_passdb_settings, name), NULL }
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic const struct setting_define auth_passdb_setting_defines[] = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenstatic const struct auth_passdb_settings auth_passdb_default_settings = {
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen .skip = "never:authenticated:unauthenticated",
/* NOTE: when adding fields, update also auth.c:userdb_dummy_set */
.cache_size = 0,
.last_valid_uid = 0,
.last_valid_gid = 0,
const char **error_r)
const char *const *tmp;
unsigned int ips_count;
int ret;
return TRUE;
if (ret != 0) {
return TRUE;
const char **error_r)
unsigned int num;
if (p != NULL) {
return FALSE;
return TRUE;
return TRUE;
return TRUE;
return TRUE;
return FALSE;
const char **error_r)
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
const char **error_r)
return FALSE;
return FALSE;
return TRUE;
const char **error_r)
return FALSE;
return TRUE;
struct auth_settings *
const char *error;
void **sets;
i_unreached();
return sets[0];