Don't overwrite creation time if set by make_create_timespec

Jeremy Allison jra at
Tue Mar 11 17:59:03 MDT 2014

On Mon, Mar 10, 2014 at 05:59:41PM +0100, Ralph Böhme wrote:
> Hi
> smb2_create calls dos_mode() after calling SMB_VFS_CREATE_FILE(), as a
> result the creation time as set by make_create_timespec() is always
> overwritten.
> Add a check to dos_mode() that tests for st_ex_calculated_birthtime ==
> true and only then update the creation time with the value from the
> DOS attribute xattr.
> Review appreciated. Thanks!

OK, I'm not sure this change is correct. What bug are
you trying to fix here ?

In Win32, the SetFileTime() call can change the
creation time on a file, so create time is not
immutable. Because of that, overwriting the
create time stored in the EA with the one from
the filesystem is not always the right thing
to do, even if the filesystem stores create

If I had more context on what bug you're
trying to fix that would help.



More information about the samba-technical mailing list