changeset 5381:ba8da13e71da HEAD

Added blocking=yes setting for passdb passwd and shadow also.
author Timo Sirainen <tss@iki.fi>
date Thu, 22 Mar 2007 03:36:44 +0200
parents 0e64feabb0d2
children 7e0f9862b524
files dovecot-example.conf src/auth/passdb-passwd.c src/auth/passdb-shadow.c
diffstat 3 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dovecot-example.conf	Thu Mar 22 02:06:24 2007 +0200
+++ b/dovecot-example.conf	Thu Mar 22 03:36:44 2007 +0200
@@ -825,11 +825,15 @@
   # configured in /etc/nsswitch.conf.
   # http://wiki.dovecot.org/AuthDatabase/Passwd
   #passdb passwd {
+    # [blocking=yes] - See userdb passwd for explanation
+    #args = 
   #}
 
   # /etc/shadow or similiar, using getspnam(). Deprecated by PAM nowadays.
   # http://wiki.dovecot.org/PasswordDatabase/Shadow
   #passdb shadow {
+    # [blocking=yes] - See userdb passwd for explanation
+    #args = 
   #}
 
   # PAM-like authentication for OpenBSD.
--- a/src/auth/passdb-passwd.c	Thu Mar 22 02:06:24 2007 +0200
+++ b/src/auth/passdb-passwd.c	Thu Mar 22 03:36:44 2007 +0200
@@ -58,9 +58,11 @@
 	callback(PASSDB_RESULT_OK, request);
 }
 
-static void passwd_init(struct passdb_module *module,
-			const char *args __attr_unused__)
+static void passwd_init(struct passdb_module *module, const char *args)
 {
+	if (strcmp(args, "blocking=yes") == 0)
+		module->blocking = TRUE;
+
 	module->cache_key = PASSWD_CACHE_KEY;
 	module->default_pass_scheme = PASSWD_PASS_SCHEME;
 }
--- a/src/auth/passdb-shadow.c	Thu Mar 22 02:06:24 2007 +0200
+++ b/src/auth/passdb-shadow.c	Thu Mar 22 03:36:44 2007 +0200
@@ -58,9 +58,11 @@
 	callback(PASSDB_RESULT_OK, request);
 }
 
-static void shadow_init(struct passdb_module *module,
-			const char *args __attr_unused__)
+static void shadow_init(struct passdb_module *module, const char *args)
 {
+	if (strcmp(args, "blocking=yes") == 0)
+		module->blocking = TRUE;
+
 	module->cache_key = SHADOW_CACHE_KEY;
 	module->default_pass_scheme = SHADOW_PASS_SCHEME;
 }