Mercurial > dovecot > core-2.2
changeset 10911:5a20039e8a54 HEAD
auth: passdb bsdauth, passwd and shadow are now blocking by default.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 14 Mar 2010 15:30:26 +0200 |
parents | 858ad8aa7f8b |
children | 56dda1de9b6f |
files | doc/example-config/conf.d/auth-system.conf.ext src/auth/passdb-bsdauth.c src/auth/passdb-passwd.c src/auth/passdb-shadow.c |
diffstat | 4 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/example-config/conf.d/auth-system.conf.ext Sun Mar 14 15:28:31 2010 +0200 +++ b/doc/example-config/conf.d/auth-system.conf.ext Sun Mar 14 15:30:26 2010 +0200 @@ -19,7 +19,7 @@ # configured in /etc/nsswitch.conf. <doc/wiki/AuthDatabase.Passwd.txt> #passdb { #driver = passwd - # [blocking=yes] + # [blocking=no] #args = #} @@ -28,7 +28,7 @@ # <doc/wiki/PasswordDatabase.Shadow.txt> #passdb { #driver = shadow - # [blocking=yes] + # [blocking=no] #args = #} @@ -36,7 +36,7 @@ # <doc/wiki/PasswordDatabase.BSDAuth.txt> #passdb { #driver = bsdauth - # [cache_key=<key>] + # [blocking=no] [cache_key=<key>] #args = #}
--- a/src/auth/passdb-bsdauth.c Sun Mar 14 15:28:31 2010 +0200 +++ b/src/auth/passdb-bsdauth.c Sun Mar 14 15:30:26 2010 +0200 @@ -55,8 +55,11 @@ module = p_new(pool, struct passdb_module, 1); module->default_pass_scheme = "PLAIN"; /* same reason as PAM */ + module->blocking = TRUE; - if (strncmp(args, "cache_key=", 10) == 0) + if (strcmp(module->args, "blocking=no") == 0) + module->blocking = FALSE; + else if (strncmp(args, "cache_key=", 10) == 0) module->cache_key = auth_cache_parse_key(pool, args + 10); else if (*args != '\0') i_fatal("passdb bsdauth: Unknown setting: %s", args);
--- a/src/auth/passdb-passwd.c Sun Mar 14 15:28:31 2010 +0200 +++ b/src/auth/passdb-passwd.c Sun Mar 14 15:30:26 2010 +0200 @@ -59,8 +59,9 @@ static void passwd_init(struct passdb_module *module) { - if (strcmp(module->args, "blocking=yes") == 0) - module->blocking = TRUE; + module->blocking = TRUE; + if (strcmp(module->args, "blocking=no") == 0) + module->blocking = FALSE; else if (*module->args != '\0') i_fatal("passdb passwd: Unknown setting: %s", module->args);
--- a/src/auth/passdb-shadow.c Sun Mar 14 15:28:31 2010 +0200 +++ b/src/auth/passdb-shadow.c Sun Mar 14 15:30:26 2010 +0200 @@ -59,8 +59,9 @@ static void shadow_init(struct passdb_module *module) { - if (strcmp(module->args, "blocking=yes") == 0) - module->blocking = TRUE; + module->blocking = TRUE; + if (strcmp(module->args, "blocking=no") == 0) + module->blocking = FALSE; else if (*module->args != '\0') i_fatal("passdb shadow: Unknown setting: %s", module->args);