summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-01-05 14:35:11 +0100
committerVolker Lendecke <vl@samba.org>2011-01-07 13:28:07 +0100
commitdab6a35f4cf6a7e8a3c05319e891e06887d63998 (patch)
treee97a8aaf88b711b47e46d6eeed173f35d7cbf9e4 /source3/nmbd
parent0cff82e054cea6b473dcfa6de840ece7327ef6ca (diff)
downloadsamba-dab6a35f4cf6a7e8a3c05319e891e06887d63998.tar.gz
samba-dab6a35f4cf6a7e8a3c05319e891e06887d63998.tar.bz2
samba-dab6a35f4cf6a7e8a3c05319e891e06887d63998.zip
s3: Limit the number of unexpected clients to 200
DoS protection like the max winbind clients. Settable by nmbd:unexpected_clients
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd_packets.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c
index ec5225a5ec..c2a5204fac 100644
--- a/source3/nmbd/nmbd_packets.c
+++ b/source3/nmbd/nmbd_packets.c
@@ -37,8 +37,10 @@ bool nmbd_init_packet_server(void)
{
NTSTATUS status;
- status = nb_packet_server_create(NULL, nmbd_event_context(), 0,
- &packet_server);
+ status = nb_packet_server_create(
+ NULL, nmbd_event_context(),
+ lp_parm_int(-1, "nmbd", "unexpected_clients", 200),
+ &packet_server);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("ERROR: nb_packet_server_create failed: %s\n",
nt_errstr(status)));