[jcifs] Just an idea...

Christopher R. Hertel crh at ubiqx.mn.org
Sun Nov 24 08:12:55 EST 2002

On Sat, Nov 23, 2002 at 03:14:01PM -0500, Michael B. Allen wrote:
> > 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.

That's for an integrated system, where the client and server are both 
built into the OS.

> > 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.

So you are assuming that the field is supposed to represent the type of
the local, integrated client *and* server system.  That's not what I'm
assuming.  I'm saying that the field, when sent in the Session Setup
Request, represents the client type.  There are a lot of systems that run 
as clients but offer no services.

> Because we would be lying.

...but "foo" is lying too.

> 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.

I don't think that the server thinks anything, and even if it does, the 
"foo" server is lying too.

The Server side of such a connection isn't going to do anything based on 
the presumed assumption that the client has a server of type "X" running.
The information is only valid within the session.  If someone on the 
server machine tries to connect to services on the system running jCIFS 
then they will start a new session, get a new Session Setup, and use the 
server type returned in the Session Setup Response.

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

...or 'jCIFS'.

I have two reasons for wanting this.  One is that it looks better in the 
examples in my book.  :)

The other is that people are embedding jCIFS into other products and 
projects.  It would be nice to identify ourselves.  Since the value is set 
by a property, they can override us if they want.  The default, though, 
could be "jCIFS" as easily as it could be "foo".

Other than that, it's (obviously) a very minor point.  My belief is that
the only use of the field is as an identifier in error messages on the
server side.

Chris -)-----

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