[dovecot-cvs] dovecot/src/auth passdb-checkpassword.c, 1.18.2.4, 1.18.2.5 passdb-pam.c, 1.37.2.5, 1.37.2.6

cras at dovecot.org cras at dovecot.org
Fri Aug 11 18:03:46 EEST 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv8897

Modified Files:
      Tag: branch_1_0
	passdb-checkpassword.c passdb-pam.c 
Log Message:
Set SIGCHLD handler in init, not in preinit when lib_signals_init() hasn't
yet been called.



Index: passdb-checkpassword.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-checkpassword.c,v
retrieving revision 1.18.2.4
retrieving revision 1.18.2.5
diff -u -d -r1.18.2.4 -r1.18.2.5
--- passdb-checkpassword.c	10 Aug 2006 21:59:39 -0000	1.18.2.4
+++ passdb-checkpassword.c	11 Aug 2006 15:03:44 -0000	1.18.2.5
@@ -393,6 +393,12 @@
 	return &module->module;
 }
 
+static void checkpassword_init(struct passdb_module *_module __attr_unused__,
+			       const char *args __attr_unused__)
+{
+	lib_signals_set_handler(SIGCHLD, TRUE, sigchld_handler, NULL);
+}
+
 static void checkpassword_deinit(struct passdb_module *_module)
 {
 	struct checkpassword_passdb_module *module =
@@ -415,7 +421,7 @@
 	"checkpassword",
 
 	checkpassword_preinit,
-	NULL,
+	checkpassword_init,
 	checkpassword_deinit,
 
 	checkpassword_verify_plain,

Index: passdb-pam.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-pam.c,v
retrieving revision 1.37.2.5
retrieving revision 1.37.2.6
diff -u -d -r1.37.2.5 -r1.37.2.6
--- passdb-pam.c	10 Aug 2006 21:59:39 -0000	1.37.2.5
+++ passdb-pam.c	11 Aug 2006 15:03:44 -0000	1.37.2.6
@@ -467,10 +467,15 @@
 	}
 	t_pop();
 
-	lib_signals_set_handler(SIGCHLD, TRUE, sigchld_handler, NULL);
 	return &module->module;
 }
 
+static void pam_init(struct passdb_module *_module __attr_unused__,
+		     const char *args __attr_unused__)
+{
+	lib_signals_set_handler(SIGCHLD, TRUE, sigchld_handler, NULL);
+}
+
 static void pam_deinit(struct passdb_module *_module __attr_unused__)
 {
 	lib_signals_unset_handler(SIGCHLD, sigchld_handler, NULL);
@@ -480,7 +485,7 @@
 	"pam",
 
 	pam_preinit,
-	NULL,
+	pam_init,
 	pam_deinit,
 
 	pam_verify_plain,



More information about the dovecot-cvs mailing list