Samba 3.0.32 - file last write time
Stefan (metze) Metzmacher
metze at samba.org
Thu Sep 4 10:02:52 GMT 2008
Dina Fine schrieb:
> Hello Jeremy
>
> Windows client doesn't update the file modification time on write
> request if the file last write time was changed via SET_FILE_INFO.
> I noticed that you handle this by setting the file mtime using the
> pending mtime value on each write request (in real_write function)
> But on empty write requests (offset = x, count = 0) when only the file
> size is allocated or shrunk, you don't do this (reply_write() in
> reply.c)
>
> So if the client opens a new file, sets the last write time (via
> set_file_info request), then the first allocating write (offset = x,
> count =0) will change the file mtime. In this case the findfirst on the
> file will return the updated mtime and not the 'last write time'.
>
> It seems that the following code (from real_write() function) should be
> also called from write_reply when count = 0:
Please note that the write time handling of samba 3.0.x doesn't match
windows behavior, in samba 3.2.x the handling for write times has improved.
But I assume samba 3.2.x has also the count = 0 problem.
Jeremy could you please write a torture test for this:-)
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20080904/92677785/signature.bin
More information about the samba-technical
mailing list