From 662eaecee6b36a0bbaf3524ac50aca47ec437923 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 14 Dec 1997 18:45:51 +0000 Subject: give out file handles differently on each new connection because of a common bug in MS clients where they try to reuse a file descriptor from an earlier smb connection. This code increases the chance that the errant client will get an error rather than causing corruption (This used to be commit 677d7a5a13728d8207dd2e7092c98d026d2d4f3c) --- source3/smbd/server.c | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) (limited to 'source3') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 15258e02ea..bf66e1ca4b 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -3630,16 +3630,35 @@ int make_connection(char *service,char *user,char *password, int pwlen, char *de ****************************************************************************/ int find_free_file(void ) { - int i; - /* returning a file handle of 0 is a bad idea - so we start at 1 */ - for (i=1;i