[PATCH] s3: Report ctime as change time, not mtime

Jeremy Allison jra at samba.org
Mon Feb 13 17:59:43 MST 2012

On Mon, Feb 13, 2012 at 11:23:41AM -0700, Christof Schmitt wrote:
> I am working on a patch to store the ctime with the
> gpfs_set_times() call. While testing setting and storing
> timestamps i discovered that querying the timestamps from a cifs
> client does not return all four timestamps. It seems that the
> mtime is reported for two timestamps and the ctime is being
> discarded:
> E.g. in smbd_do_qfilepathinfo():
>         mtime_ts = psbuf->st_ex_mtime;
>         ctime_ts = get_change_timespec(conn, fsp, smb_fname);
> and get_change_timespec also returns the mtime.
> The attached patch changes get_change_timespec to return the
> ctime, so that all timestamps set through the vfs set_times call can
> be queried through the vfs stat calls.

I don't think this is correct, but you'll have to wait
until I analyse this more in order to be accurate.

The basic problem is:

UNIX ctime != Windows change time.


More information about the samba-technical mailing list