[jcifs] bug accessing win2003 server dfs

Michael B Allen mba2000 at ioplex.com
Sat Sep 2 01:27:59 GMT 2006

On Fri, 01 Sep 2006 22:24:40 +0200
Thomas Bley <thomas.bley at simple-groupware.de> wrote:

> Hello Alex,
> I had similar problems with dfs (both win2003 / samba), esp. with 
> dfs-links containing dfs-links.
> Using "dunc" in getdfsuncpath0 caused problems for me when making more 
> than one call to listFiles.
> See my modified version of SmbFile.java in the webdisk package: 
> http://sourceforge.net/projects/webdisk/
> I went back to an older style of jCIFS in send() without the 
> getDfsUncPath0() function:
> unc = dfsReferral.nodepath + unc.substring( dfsReferral.path.length() );
> if( request.path.charAt( request.path.length() - 1 ) == '\\' ) {
>   request.path = unc + '\\';
> } else {
>   request.path = unc;
> }

The tricky thing about DFS is that a fix for one person can easily cause
failure for another. The solution will be to look really closely at the
semantics of paths and path components in the DFS referral messages. I
can't just tack on a slash and hope for the best.

I'll add this to The List (actually I think I added this to The List
before but it could be independantly important).


Michael B Allen
PHP Active Directory SSO

More information about the jcifs mailing list