author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 3 Dec 2006 17:43:53 +0000 (18:43 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 3 Dec 2006 17:43:53 +0000 (18:43 +0100) | ||
commit | 5b9630d76f7a899633037045e753ebf0542ebbef | |
tree | bf5588b8ed5002a73af2fd117e00f898ac0cce1f | tree | snapshot |
parent | 7d7947e8e1125b0d9e27549882f158887cb095ca | commit | diff |
email plugin: Limit the `MaxConns' option by a hardcoded value.
Because typos (and ``typos'', i. e. dumb users) happen, it's better to not
allow INT_MAX connections. The problem is that on 32bit machines this would
a) create 2147483648 threads
b) allocate (at least) 512 GBytes of memory
which would result in certain death of either the daemon or the system.
This patch limits the number of connections (and thus threads and allocated
memory) to 16384, which ought to be enough for most people. Those, who need
more connections (and can accomplish this, even though there are quite narrow
OS limits) will need to recompile themselves.
Because typos (and ``typos'', i. e. dumb users) happen, it's better to not
allow INT_MAX connections. The problem is that on 32bit machines this would
a) create 2147483648 threads
b) allocate (at least) 512 GBytes of memory
which would result in certain death of either the daemon or the system.
This patch limits the number of connections (and thus threads and allocated
memory) to 16384, which ought to be enough for most people. Those, who need
more connections (and can accomplish this, even though there are quite narrow
OS limits) will need to recompile themselves.
src/email.c | diff | blob | history |