Luke Kenneth Casson Leighton
lkcl at cb1.com
Sun Aug 3 14:53:40 GMT 1997
On Wed, 30 Jul 1997 ben at samba1.nrl.navy.mil wrote:
> When accessing a file on a Samba resource the create time is updated along
> with the access time so that they both indicate the time of last access.
> Is there a way to have the create time indicate the file creation time?
> Samba-1.9.16p11, Slackware 3.2
this is a bug in w95. i tracked this one down a couple of weeks ago by
hacking about, so we know what the problem is, and roughly what to do to
fix it. it will require a number of hours' work to nail down and test.
1) the trans2 getfileinfo request is sent by w95.
2) samba responds with the data part of the packet word aligned (at
offset 56 in the smb packet). a packet trace of a similar getfileinfo
packet to a w95 server shows this offset to be 55 bytes. also, the
"created" time is marked as zero (unknown, or unmodified). also, the
access mode is 0x5704, which probably has _absolutely_ nothing to do with
the access modes listed for the SMB_QUERY_FILE_BASIC info level in the
cifs spec (cifs6.txt). also, the _size_ of the data section of the
response is 40 bytes on a w95 server, and we respond, as per the
cifs6.txt spec, with 36 bytes.
3) the w95 server responds by taking the packet that the samba server
sent as a response, changes the response field to a query, and just...
feeds the packet back to you! utter stupidity, because (unfortunately),
that means that it's doing a trans2 setfileinfo request. this has the
effect of setting the timestamp on the file, which resets the create time
to that of the modified time.
so... in a roundabout, and complete, way, you have the answer. and if
anyone's feeling brave, and understands SMB, they can fix it!
More information about the samba