]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Disable forking after setuid(), so Linux 2.6 is happy.
authorTimo Sirainen <tss@iki.fi>
Wed, 16 Jul 2003 06:37:04 +0000 (09:37 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 16 Jul 2003 06:37:04 +0000 (09:37 +0300)
--HG--
branch : HEAD

src/login-common/main.c

index 4681179ffda4e645b376c7d8af60b9905fdd34ab..ec129d65dbd86f69ca369686c2dc2b24ffeeda33 100644 (file)
@@ -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)