summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2007-12-26 14:18:11 +0100
committerVolker Lendecke <vl@samba.org>2007-12-26 14:55:57 +0100
commit250c57ccfbae343e8d713c768d0288f73a0a5013 (patch)
tree334fdabe6867f9d6b26dd1ff1e4804079673a3c1 /source3/smbd/open.c
parentf99af84e6a48c8e3e3e4af9f06d31669a6fb2d90 (diff)
downloadsamba-250c57ccfbae343e8d713c768d0288f73a0a5013.tar.gz
samba-250c57ccfbae343e8d713c768d0288f73a0a5013.tar.bz2
samba-250c57ccfbae343e8d713c768d0288f73a0a5013.zip
We need to return the correct atime
On systems with nanosecond atime we need to re-stat after messing with the fd, at least Solaris 10 updates atime after we stat(2)ed the file. (This used to be commit 6e6ec0a563f8b7e3d4618ce60e776bcce53f40c4)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c7
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;