diff options
-rw-r--r-- | source3/smbd/open.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 9428b47b6a..f30808b30a 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2667,7 +2667,12 @@ NTSTATUS create_file_unixpath(connection_struct *conn, *pinfo = info; } if (psbuf != NULL) { - *psbuf = sbuf; + if ((fsp->fh == NULL) || (fsp->fh->fd == -1)) { + *psbuf = sbuf; + } + else { + SMB_VFS_FSTAT(fsp, fsp->fh->fd, psbuf); + } } return NT_STATUS_OK; |