summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-25 01:56:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:36 -0500
commite90ab07050f2fe8dd1c4399e5deff7eddf66e6d0 (patch)
treec587c253922b3c6efd1cf657de50cd49f7cd9265 /source4/ntvfs
parent2a5eb0ceba2fd225c8854891899461a61673db41 (diff)
downloadsamba-e90ab07050f2fe8dd1c4399e5deff7eddf66e6d0.tar.gz
samba-e90ab07050f2fe8dd1c4399e5deff7eddf66e6d0.tar.bz2
samba-e90ab07050f2fe8dd1c4399e5deff7eddf66e6d0.zip
r3178: honor the write_time on pvfs_close()
(This used to be commit 4e28c45bafa453eaa94716a5b77d830b81efe6cf)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 7f06626706..ac2742d357 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -605,6 +605,7 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = ntvfs->private_data;
struct pvfs_file *f;
NTSTATUS status;
+ struct utimbuf unix_times;
if (io->generic.level != RAW_CLOSE_CLOSE) {
return ntvfs_map_close(req, io, ntvfs);
@@ -615,6 +616,10 @@ NTSTATUS pvfs_close(struct ntvfs_module_context *ntvfs,
return NT_STATUS_INVALID_HANDLE;
}
+ unix_times.actime = 0;
+ unix_times.modtime = io->close.in.write_time;
+ utime(f->name->full_name, &unix_times);
+
if (f->fd != -1 &&
close(f->fd) == -1) {
status = pvfs_map_errno(pvfs, errno);