[jcifs] Just an idea...

Michael B. Allen miallen at eskimo.com
Sun Nov 24 07:14:01 EST 2002

On Sat, 23 Nov 2002 13:26:20 -0600
"Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:

> On Fri, Nov 22, 2002 at 09:47:24PM -0500, Michael B. Allen wrote:
> > On Fri, 22 Nov 2002 17:21:23 -0600
> > "Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:
> > 
> > > jCIFS currently places the name "foo" into the "Native LAN Manager" field 
> > > of the Session Setup AndX.
> > > 
> > > I think it should say "jCIFS".
> > > 
> > > If "foo" is safe, then...
> > 
> > My understanding is that the 'Native LAN Manager' field is supposed to
> > indicate what type of server is running. Because jCIFS has no facility
> > to determine if it's Windows, Samba, or whatever, I punted. Thus 'foo'. I
> > see no reason to change it.
> The SessionSetupAndX Request comes from the client and is sent to the
> server, so I don't see how it could be the server type.  As you point out,

Why not? This is how the client indicates to the server what type of
CIFS implementation is running on the client.

> the client cannot know the server type until it gets the Response message.

The jCIFS client can never know what the server running locally is. Not
unless it does some monkey business trying to connect to the local host.

> Windows 95 and 98 clients fill this field with "Windows 4.0", Windows NT4
> says "Windows NT 4.0", and Windows 2000 uses "Windows 2000 5.0".  All of 
> these in tests against a Samba server.  So really, when sent by the client 
> the field contains client information.  Smbclient sends "Samba".

Sure, this makes perfect sense. The client is the server so they're
the same (well not necesarily a hard fast rule in the case of Samba but
very likely).

> So my thinking is, since it doesn't seem to matter anyway, why not put 
> "jCIFS" into that field?

Because we would be lying. If jCIFS is running on a machine that has a
"Windows 2000 5.0" server running and we advertise that the local server
(NativeLanMan) is "jCIFS" the server might think were running the jCIFS
server (yet to be written :~) and it ain't so.

So there's nothing we can put in there. We have to put something. Might
as well be 'foo'.

A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 

More information about the jcifs mailing list