From: Timo Sirainen Date: Sun, 14 Mar 2010 13:30:26 +0000 (+0200) Subject: auth: passdb bsdauth, passwd and shadow are now blocking by default. X-Git-Tag: 2.0.beta4~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93977184658058ffee053adf5b9f13c10b5e5b21;p=thirdparty%2Fdovecot%2Fcore.git auth: passdb bsdauth, passwd and shadow are now blocking by default. --HG-- branch : HEAD --- diff --git a/doc/example-config/conf.d/auth-system.conf.ext b/doc/example-config/conf.d/auth-system.conf.ext index 2a23cef47d..56f4659edf 100644 --- a/doc/example-config/conf.d/auth-system.conf.ext +++ b/doc/example-config/conf.d/auth-system.conf.ext @@ -19,7 +19,7 @@ passdb { # configured in /etc/nsswitch.conf. #passdb { #driver = passwd - # [blocking=yes] + # [blocking=no] #args = #} @@ -28,7 +28,7 @@ passdb { # #passdb { #driver = shadow - # [blocking=yes] + # [blocking=no] #args = #} @@ -36,7 +36,7 @@ passdb { # #passdb { #driver = bsdauth - # [cache_key=] + # [blocking=no] [cache_key=] #args = #} diff --git a/src/auth/passdb-bsdauth.c b/src/auth/passdb-bsdauth.c index 6c5b880f5d..20aa6efa9c 100644 --- a/src/auth/passdb-bsdauth.c +++ b/src/auth/passdb-bsdauth.c @@ -55,8 +55,11 @@ bsdauth_preinit(pool_t pool, const char *args) 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); diff --git a/src/auth/passdb-passwd.c b/src/auth/passdb-passwd.c index 3fdb3acffb..d3203fcd4d 100644 --- a/src/auth/passdb-passwd.c +++ b/src/auth/passdb-passwd.c @@ -59,8 +59,9 @@ passwd_verify_plain(struct auth_request *request, const char *password, 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); diff --git a/src/auth/passdb-shadow.c b/src/auth/passdb-shadow.c index 8d46ab3393..15ca0d129d 100644 --- a/src/auth/passdb-shadow.c +++ b/src/auth/passdb-shadow.c @@ -59,8 +59,9 @@ shadow_verify_plain(struct auth_request *request, const char *password, 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);