summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3f47657dbf..9c9eff5a46 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 |