s3: Fix fcb_or_dos_open after logic change
authorVolker Lendecke <vl@samba.org>
Thu, 13 Sep 2012 13:45:49 +0000 (15:45 +0200)
committerVolker Lendecke <vl@samba.org>
Sat, 29 Sep 2012 15:42:49 +0000 (08:42 -0700)
With the new behaviour, we call fcb_or_dos_open after open_file(). It
is open_file() that sets up the fsp so that fcb_or_dos_open can find it
in the list of fsps. Avoid finding the fsp we are just setting up.

source3/smbd/open.c

index 3f47657dbf303e3c7c641e926e57c08cd0dcb935..9c9eff5a46c3040b9d9251757b65aaef0e502de7 100644 (file)
@@ -1571,7 +1571,8 @@ static NTSTATUS fcb_or_dos_open(struct smb_request *req,
                          (unsigned int)fsp->fh->private_options,
                          (unsigned int)fsp->access_mask ));
 
-               if (fsp->fh->fd != -1 &&
+               if (fsp != fsp_to_dup_into &&
+                   fsp->fh->fd != -1 &&
                    fsp->vuid == vuid &&
                    fsp->file_pid == file_pid &&
                    (fsp->fh->private_options & (NTCREATEX_OPTIONS_PRIVATE_DENY_DOS |