smbd: implement the strange write time update logic
authorStefan Metzmacher <metze@samba.org>
Wed, 12 Mar 2008 14:39:38 +0000 (15:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Apr 2008 10:29:26 +0000 (12:29 +0200)
commitd03453864ab1bc5fd3b4a3abaf96176a006c102b
tree13389e06bd05336a1937b98d3e821ad995eef019
parent2ccf50256e31bd7b9da0f7a7c223bebca5bca062
smbd: implement the strange write time update logic

We now never call file_ntimes() directly, every update
is done via smb_set_file_time().

This let samba3 pass the BASE-DELAYWRITE test.

The write time is only updated 2 seconds after the
first write() on any open handle to the current time
(not the time of the first write).

Each handle which had write requests updates the write
time to the current time on close().

If the write time is set explicit via setfileinfo or setpathinfo
the write time is visible directly and a following close
on the same handle doesn't update the write time.

metze
(This used to be commit 2eab212ea2e1bfd8fa716c2c89b2c042f7ba12ea)
source3/include/smb.h
source3/smbd/close.c
source3/smbd/dir.c
source3/smbd/dosmode.c
source3/smbd/fileio.c
source3/smbd/files.c
source3/smbd/nttrans.c
source3/smbd/reply.c
source3/smbd/trans2.c