From 590d3138be0293fbe9cb575261eb5319351d1e91 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 13 Sep 2012 15:45:49 +0200 Subject: [PATCH] s3: Fix fcb_or_dos_open after logic change 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 3f47657dbf3..9c9eff5a46c 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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 | -- 2.11.4.GIT