summaryrefslogtreecommitdiffstats
path: root/source/smbd/blocking.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-04-11 13:55:53 +0000
committerAndrew Tridgell <tridge@samba.org>2000-04-11 13:55:53 +0000
commit5937ab14d222696e40a3fc6f0e6a536f2d7305d3 (patch)
treec55cd00dbbc16ffb66f21c2ee286c0bb7f16934f /source/smbd/blocking.c
parent707401fc1e697362cdaadcfaac4edc964b80b1a0 (diff)
downloadsamba-5937ab14d222696e40a3fc6f0e6a536f2d7305d3.tar.gz
samba-5937ab14d222696e40a3fc6f0e6a536f2d7305d3.tar.xz
samba-5937ab14d222696e40a3fc6f0e6a536f2d7305d3.zip
finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed.
Diffstat (limited to 'source/smbd/blocking.c')
-rw-r--r--source/smbd/blocking.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c
index c90f475b463..ea8d2fd053a 100644
--- a/source/smbd/blocking.c
+++ b/source/smbd/blocking.c
@@ -21,7 +21,6 @@
#include "includes.h"
extern int DEBUGLEVEL;
-extern int Client;
extern char *OutBuffer;
/****************************************************************************
@@ -134,7 +133,7 @@ static void send_blocking_reply(char *outbuf, int outsize)
if(outsize > 4)
smb_setlen(outbuf,outsize - 4);
- send_smb(Client,outbuf);
+ send_smb(smbd_server_fd(),outbuf);
}
/****************************************************************************
@@ -180,7 +179,7 @@ static void generic_blocking_lock_error(blocking_lock_record *blr, int eclass, i
SSVAL(outbuf,smb_flg2, SVAL(outbuf,smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
ERROR(eclass,ecode);
- send_smb(Client,outbuf);
+ send_smb(smbd_server_fd(),outbuf);
}
/****************************************************************************