Patch from mimir to back out idra's attempted DOS mitigation patch.
authorAndrew Bartlett <abartlet@samba.org>
Sun, 25 Aug 2002 21:46:49 +0000 (21:46 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Sun, 25 Aug 2002 21:46:49 +0000 (21:46 +0000)
(It broke port 139 name exchange)

I've been thinking about this, and doing is properly is actually rather
difficult - but I'll try and get somthing in there.  (My worry is what
smb_read_error should be set to, and how that interacts with the rest of
samba).

Andrew Bartlett

source/lib/util_sock.c

index 03c780f8bfcded31c50c3bc51d79f029d4c1186b..56ef4a6ab1cd028d0b97e5b9587681fd2c641772 100644 (file)
@@ -585,8 +585,8 @@ BOOL receive_smb(int fd,char *buffer, unsigned int timeout)
        memset(buffer,'\0',smb_size + 100);
 
        len = read_smb_length_return_keepalive(fd,buffer,timeout);
-       if (len < 0 || len == 0) {
-               DEBUG(10,("receive_smb: length < 0 or == 0!\n"));
+       if (len < 0) {
+               DEBUG(10,("receive_smb: length < 0!\n"));
 
                /*
                 * Correct fix. smb_read_error may have already been