[Fwd: [jcifs] DFS with jCIFS 1.2.3 and w2k3 sp1]

Michael B Allen mba2000 at ioplex.com
Sat Sep 10 01:30:19 GMT 2005


On Sat, 10 Sep 2005 02:32:21 +0200
Thomas Bley <thomas.bley at simple-groupware.de> wrote:

> Hi, another thing I've noticed, I use this:
> 
>          SmbFile f = new SmbFile( 
> "smb://administrator:admin@192.168.0.5/MyRoot/testlink/" );
>          System.out.println( f.getDfsPath() );
>          SmbFile[] fs = f.listFiles();
>          for (int i=0;i<fs.length;i++) {
>          	System.out.println(fs[i].getName());
>          }
> 
> where "testlink" is a dfslink. It's strange that I get the right 
> contents with listFiles, is this a feature of w2k3 or does jCIFS 
> automatically connect to the linked-share ?

If credentials are not "external" (meaning obtained via NTLM HTTP negotiation) then DFS is completely transparent to the user. If the credentials are external, the user (the HTTP servlet) will get DfsReferral exception when trying to access a resource in DFS in which case they should then do a corresponding HTTP redirect. Again, for that, look at src/jcifs/http/NetworkExplorer.java.

> Do I need the dfsreferral things ?

If you are using NTLM HTTP authentication then yes. Otherwise, in cases like your test programs where the credentials were supplied then DFS redirection is completely transparent to the user as you have observed.

Currently I believe your WebDisk program does NOT do NTLM HTTP authentication right? Therefore credentials are not "external" and DFS should work as is right now [1] with no modifications to your program.

Mike

[1] It has been reported by several people that jCIFS DFS support does not work in all cases. Apparently there is some additional protocol that is not fully understood or there is some kind of protocol error occuring. Until we can obtain a capture of a successful referral in this environment we cannot properly support this "mystery" flavor of DFS.


More information about the jcifs mailing list