]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Reverted previous change, it wasn't correct..
authorTimo Sirainen <tss@iki.fi>
Wed, 6 Aug 2008 16:48:02 +0000 (12:48 -0400)
committerTimo Sirainen <tss@iki.fi>
Wed, 6 Aug 2008 16:48:02 +0000 (12:48 -0400)
--HG--
branch : HEAD

src/login-common/main.c

index 2a24eb22c3d8c78dc4f5829f6844fa166c17ad2a..756e14ace2df3fd71ef75ab938ab679bff92b011 100644 (file)
@@ -252,7 +252,6 @@ static void auth_connect_notify(struct auth_client *client ATTR_UNUSED,
 static void drop_privileges(void)
 {
        const char *value;
-       unsigned int max_fd_per_conn;
 
        if (!is_inetd)
                i_set_failure_internal();
@@ -282,14 +281,10 @@ static void drop_privileges(void)
        value = getenv("MAX_CONNECTIONS");
        max_connections = value == NULL ? 1 : strtoul(value, NULL, 10);
 
-       /* max fds: connection itself, SSL socketpair, login proxy socketpair */
-       max_fd_per_conn = 1 + (ssl_initialized ? 2 : 0) + 2;
-
        /* set the number of fds we want to use. it may get increased or
           decreased. leave a couple of extra fds for auth sockets and such */
        restrict_fd_limit(LOGIN_MASTER_SOCKET_FD + 16 +
-                         listen_count + ssl_listen_count +
-                         max_connections * max_fd_per_conn);
+                         listen_count + ssl_listen_count + max_connections);
 
        /* Refuse to run as root - we should never need it and it's
           dangerous with SSL. */