From: Stefan Metzmacher Date: Thu, 30 Jun 2011 07:56:06 +0000 (+0200) Subject: s3:nmbd_packets: return the used number of sockets in create_listen_fdset() (bug... X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=d9c0ace4311560a6f4a4df6d722b143a58cc6e9d s3:nmbd_packets: return the used number of sockets in create_listen_fdset() (bug #8276) Fix bug #7949 (DoS in Winbind and smbd with many file descriptors open) (commit feb3fcd0fa4bda0967b881315595d7702f4d1752) changed the bahavior, so that we skipped some sockets. This should work for v3-3-test. metze --- diff --git a/source/nmbd/nmbd_packets.c b/source/nmbd/nmbd_packets.c index 03e53623e21..bb65e39bfc0 100644 --- a/source/nmbd/nmbd_packets.c +++ b/source/nmbd/nmbd_packets.c @@ -1742,7 +1742,7 @@ only use %d.\n", (count*2) + 2, FD_SETSIZE)); *maxfd = MAX( *maxfd, subrec->dgram_sock); } - *listen_number = (count*2) + 2; + *listen_number = num; SAFE_FREE(*ppset); SAFE_FREE(*psock_array);