[jcifs] Changes in jCIFS

Christopher R. Hertel crh at samba.org
Wed Aug 3 11:35:03 MDT 2011

Michael B Allen wrote:
> On Tue, Aug 2, 2011 at 2:51 PM, Christopher R. Hertel <crh at samba.org> wrote:
>> Michael B Allen wrote:
>> :
>>>> Moreover, the regular behavior for OpenSolaris and FreeBSD is, that the
>>>> files get sorted alphabetically descending, so the last file is at the
>>>> bottom. Are there some cases in which the last file is at the top?
>>> Again, there is no spec so there is nothing that says that the "last
>>> file index" has to be at the end of the message. But I don't recall
>>> ever seeing an message that did not place the last file at the end of
>>> the message.
>> There should be a specification for this.  Which call is it?  Let me know
>> and I will look it up.  If it's not specified, I can file a documentation
>> bug report.
> Hi Chris,
> I am aware of the work that you have done on the Microsoft Windows
> protocol documents in this area. But as I pointed out earlier in the
> thread, no such documentation existed when all of the servers like
> Samba, iSeries, EMC, etc (or Windows) were written. So everyone just
> wrote and tested their code until the various Windows clients were
> satisfied. And that is largely why we see variation in what the
> lastNameOffset field of the TRANS2_FIND_FIRST2 response actually
> points to and I believe it is why we have seen issues with listing
> files on iSeries and the server Marco is using (Solaris was it?).

Understood.  The lack of documentation over so many years led to a lot of
randomization in the implementations.

...but you wrote "there is no spec", which is no longer true.  I am quite
painfully well aware that there are a lot of implementations out there that
were written before the specifications, and that they are all over the road,
but now that we have so many groups showing up at the plugfests there is a
real effort to fix bugs.

> Notice the following comment in Trans2FindFirst2Response.java:
>     /* lastNameOffset ends up pointing to either to
>      * the exact location of the filename(e.g. Win98)
>      * or to the start of the entry containing the
>      * filename(e.g. NT). Ahhrg! In either case the
>      * lastNameOffset falls between the start of the
>      * entry and the next entry.
>      */
> Of course we don't care about Windows 98 or NT anymore.

Well...  We still get OS/2 support issues on the Samba-Technical mailing
list (yes, really) and some of us who do CIFS consulting get asked for this
kind of support as well.

The [MS-CIFS] document specifically covers W98SE clients, W-ME clients, NT 4
Workstation clients, and NT 3.51 and NT 4 servers.

I can tell you first-hand that the vast majority of the SMB/CIFS code in
Windows 2008 and Windows 7 is exactly the same as it was in NT 4.

Yep, really.


Chris -)-----
"In theory, theory and practice are the same.  In practice they're not."
I still lean further to the theory side.

"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org

More information about the jCIFS mailing list