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.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11b4dec29c9306531e73d5f4c12f89934dd538b4;p=thirdparty%2Fsamba.git 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-4-test. metze --- diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 1c570ea617d..855f6af596a 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/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);