Mercurial > dovecot > core-2.2
changeset 9834:3f4d796db5fd HEAD
config: Auth settings now require the "auth_" prefix also inside auth blocks.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 31 Aug 2009 12:43:23 -0400 |
parents | a0ec16185806 |
children | 4bd18ca73175 |
files | dovecot-example.conf src/auth/auth-settings.c src/config/config-parser.c |
diffstat | 3 files changed, 9 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/dovecot-example.conf Mon Aug 31 12:20:38 2009 -0400 +++ b/dovecot-example.conf Mon Aug 31 12:43:23 2009 -0400 @@ -743,9 +743,6 @@ # Executable location #auth_executable = /usr/libexec/dovecot/dovecot-auth -# Set max. process size in megabytes. -#auth_process_size = 256 - # Authentication cache size in kilobytes. 0 means it's disabled. # Note that bsdauth, PAM and vpopmail require cache_key to be set for caching # to be used. @@ -840,7 +837,7 @@ # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey # gss-spnego # NOTE: See also disable_plaintext_auth setting. - mechanisms = plain + auth_mechanisms = plain # # Password database is used to verify user's password (and nothing more). @@ -1041,29 +1038,13 @@ #userdb vpopmail { #} - # User to use for the process. This user needs access to only user and - # password databases, nothing else. Only shadow and pam authentication - # requires roots, so use something else if possible. Note that passwd - # authentication with BSDs internally accesses shadow files, which also - # requires roots. Note that this user is NOT used to access mails. - # That user is specified by userdb above. - user = root - - # Directory where to chroot the process. Most authentication backends don't - # work if this is set, and there's no point chrooting if auth_user is root. - # Note that valid_chroot_dirs isn't needed to use this setting. - #chroot = - - # Number of authentication processes to create - #count = 1 - # Require a valid SSL client certificate or the authentication fails. - #ssl_require_client_cert = no + #auth_ssl_require_client_cert = no # Take the username from client's SSL certificate, using # X509_NAME_get_text_by_NID() which returns the subject's DN's # CommonName. - #ssl_username_from_cert = no + #auth_ssl_username_from_cert = no } # If you wish to use another authentication server than dovecot-auth, you can
--- a/src/auth/auth-settings.c Mon Aug 31 12:20:38 2009 -0400 +++ b/src/auth/auth-settings.c Mon Aug 31 12:43:23 2009 -0400 @@ -60,15 +60,16 @@ MEMBER(struct_size) sizeof(struct auth_userdb_settings) }; +/* we're kind of kludging here to avoid "auth_" prefix in the struct fields */ #undef DEF #undef DEFLIST #define DEF(type, name) \ - { type, #name, offsetof(struct auth_settings, name), NULL } + { type, "auth_"#name, offsetof(struct auth_settings, name), NULL } #define DEFLIST(field, name, defines) \ { SET_DEFLIST, name, offsetof(struct auth_settings, field), defines } static struct setting_define auth_setting_defines[] = { - DEF(SET_STR, name), + { SET_STR, "name", offsetof(struct auth_settings, name), NULL }, DEF(SET_STR, mechanisms), DEF(SET_STR, realms), DEF(SET_STR, default_realm),
--- a/src/config/config-parser.c Mon Aug 31 12:20:38 2009 -0400 +++ b/src/config/config-parser.c Mon Aug 31 12:43:23 2009 -0400 @@ -575,16 +575,16 @@ /* get auth_* settings working outside auth sections. we'll verify that the setting is valid, but delay actually adding it */ - const char *s = t_strdup(str_c(str) + 5); + const char *s = t_strdup(str_c(str)); str_truncate(str, 0); - str_printfa(str, "auth/0/%s=", key + 5); + str_printfa(str, "auth/0/%s=", key); if (*value != '<' || !expand_files) str_append(str, value); else str_append_file(str, key, value+1, &errormsg); - if (config_apply_line(parsers, key + 5, str_c(str), NULL, &errormsg) < 0) + if (config_apply_line(parsers, key, str_c(str), NULL, &errormsg) < 0) break; array_append(&auth_defaults, &s, 1); }