From 479a34bd17a5e34f8cb9008004af2d1ca73cd467 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 30 Jun 2011 09:56:06 +0200 Subject: [PATCH] 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 --- source/nmbd/nmbd_packets.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source/nmbd/nmbd_packets.c b/source/nmbd/nmbd_packets.c index 03e5362..bb65e39 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); -- 1.7.4.1