From: Timo Sirainen Date: Wed, 16 Jul 2003 06:37:04 +0000 (+0300) Subject: Disable forking after setuid(), so Linux 2.6 is happy. X-Git-Tag: 1.1.alpha1~4477 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44bd9d1ed74215a8c69ad82caeb6585af96d79ba;p=thirdparty%2Fdovecot%2Fcore.git Disable forking after setuid(), so Linux 2.6 is happy. --HG-- branch : HEAD --- diff --git a/src/login-common/main.c b/src/login-common/main.c index 4681179ffd..ec129d65db 100644 --- a/src/login-common/main.c +++ b/src/login-common/main.c @@ -130,9 +130,6 @@ static void open_logfile(const char *name) static void drop_privileges(const char *name) { - /* make sure we can't fork() */ - restrict_process_size((unsigned int)-1, 1); - /* Log file or syslog opening probably requires roots */ open_logfile(name); @@ -143,6 +140,9 @@ static void drop_privileges(const char *name) /* Refuse to run as root - we should never need it and it's dangerous with SSL. */ restrict_access_by_env(TRUE); + + /* make sure we can't fork() */ + restrict_process_size((unsigned int)-1, 1); } static void main_init(void)