dovecot-2.1: login: Moved all i_fatal()s to preinit stage.

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 19 23:42:16 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/1827699b8156
changeset: 13739:1827699b8156
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 19 23:42:05 2011 +0200
description:
login: Moved all i_fatal()s to preinit stage.
This avoids a wrongly configured login process from rapidly respawning.

diffstat:

 src/login-common/main.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 5ce2123d24ed -r 1827699b8156 src/login-common/main.c
--- a/src/login-common/main.c	Sat Nov 19 23:41:50 2011 +0200
+++ b/src/login-common/main.c	Sat Nov 19 23:42:05 2011 +0200
@@ -290,12 +290,6 @@
 	if (allow_core_dumps)
 		restrict_access_allow_coredumps(TRUE);
 	initial_service_count = master_service_get_service_count(master_service);
-}
-
-static void main_init(const char *login_socket)
-{
-	/* make sure we can't fork() */
-	restrict_process_count(1);
 
 	if (restrict_access_get_current_chroot() == NULL) {
 		if (chdir("login") < 0)
@@ -308,6 +302,12 @@
 			login_rawlog_dir);
 		login_rawlog_dir = NULL;
 	}
+}
+
+static void main_init(const char *login_socket)
+{
+	/* make sure we can't fork() */
+	restrict_process_count(1);
 
 	master_service_set_avail_overflow_callback(master_service,
 						   client_destroy_oldest);


More information about the dovecot-cvs mailing list