summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-11-05 16:20:11 -0800
committerJeremy Allison <jra@samba.org>2009-11-05 16:20:11 -0800
commit7f9fe127ba31e6dd064d090d5ffc8eeb377627ab (patch)
tree6b2c63f2d022c82c14ea517bac06e49a605b4f5e /source3/smbd/reply.c
parentc2df97f57ce205935c37cd5a90cfeddb129cd92b (diff)
downloadsamba-7f9fe127ba31e6dd064d090d5ffc8eeb377627ab.tar.gz
samba-7f9fe127ba31e6dd064d090d5ffc8eeb377627ab.tar.bz2
samba-7f9fe127ba31e6dd064d090d5ffc8eeb377627ab.zip
Get closer to an accurate model of Windows timestamp changes.
"Normal" non truncate writes always cause the timestamp to be set on close. Once a close is done on a handle this can reset the sticky write time to current time also. Updated smbtorture4 confirms this. Jeremy.
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 984cf56c11..37634acc2c 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4646,7 +4646,7 @@ void reply_close(struct smb_request *req)
*/
t = srv_make_unix_date3(req->vwv+1);
- set_close_write_time(fsp, convert_time_t_to_timespec(t));
+ set_close_write_time(NULL, fsp, convert_time_t_to_timespec(t));
/*
* close_file() returns the unix errno if an error
@@ -4723,7 +4723,7 @@ void reply_writeclose(struct smb_request *req)
nwritten = write_file(req,fsp,data,startpos,numtowrite);
- set_close_write_time(fsp, mtime);
+ set_close_write_time(NULL, fsp, mtime);
/*
* More insanity. W2K only closes the file if writelen > 0.
@@ -6691,7 +6691,7 @@ NTSTATUS copy_file(TALLOC_CTX *ctx,
close_file(NULL, fsp1, NORMAL_CLOSE);
/* Ensure the modtime is set correctly on the destination file. */
- set_close_write_time(fsp2, smb_fname_src->st.st_ex_mtime);
+ set_close_write_time(NULL, fsp2, smb_fname_src->st.st_ex_mtime);
/*
* As we are opening fsp1 read-only we only expect