summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-06-30 09:56:06 +0200
committerKarolin Seeger <kseeger@samba.org>2011-08-18 21:15:21 +0200
commitd9192349311c59e7ec5b58747fa8c393af5f9d3d (patch)
tree39d89198aa406499c1ae287c7f581c748fd4d91b
parent38ccc2d665bb3f80fcb46a21b7646f3e0a09b7c9 (diff)
downloadsamba-d9192349311c59e7ec5b58747fa8c393af5f9d3d.tar.gz
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 (cherry picked from commit 11b4dec29c9306531e73d5f4c12f89934dd538b4)
-rw-r--r--source3/nmbd/nmbd_packets.c2
1 files changed, 1 insertions, 1 deletions
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);