Updating creation, mod, access times in clitar.c

Luke Kenneth Casson Leighton lkcl at regent.push.net
Sat Apr 11 13:21:54 GMT 1998


On Sat, 11 Apr 1998, Richard Sharpe wrote:

> Hi,
> 
> It seems that more advanced servers keep three sets of times related to a
> file. These seem to be the last access time, the last mod time, and the
> creation time.
> 
> At the moment, I am only updating the mtime, I suspect, using an SMB setatr
> call in clitar. However, if I knew the version of the protocol in use, and
> had the extra info, I could correctly set all three (if they were available).
> 
> Now, the tar header has space for all three I believe, and I do know the
> version of the protocol, so it remains to find out what SMB to use to
> accomplish this and some rules for the following situation:
> 
> 1. Someone saves some files from a server that does not support all three
> dates
> 
> 2. Later wants to restore to a system that does ...
> 
> Perhaps the best approac is to set all three dates to the same value?
> 
> So, does this make sense, and what SMB do I use?

richard,

you'll probably get a better answer on the CIFS list.  _however_, look at
SMBgetatrE and TRANS2 QUERY/SET FILE/PATH INFO.

these are implemented in BRANCH_NTDOM / main branch: i think there may
be some divergence / extra functionality in one of them...

luke



More information about the samba-technical mailing list