[jcifs] bug accessing win2003 server dfs

Thomas Bley thomas.bley at simple-groupware.de
Fri Sep 1 20:24:40 GMT 2006


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;
}

bye
Thomas


aschlett at web.de wrote:
> The missing trailing slash in the path after a dfs referral made me change SmbFile.java's getDfcUncPath0() to this:
>
>     String getDfsUncPath0() throws SmbException {
>         getUncPath0();
>         if( dfsReferral == null ) {
>             return null;
>         }
>         // BUGFIX: adding slash
>         String dunc = dfsReferral.nodepath + unc.substring( dfsReferral.path.length() ) + "\\";
>         //return "".equals( dunc ) ? "\\" : dunc;
>         return dunc;
>     }
>
> I found this problem on the list, but it wasn't considered a major bug and no fix was provided. 
> For me this fix works very well, don't know if it affects other though, just wanted to share it.
> If it'S a real bug, it would be nice if a fix would be part of the next version...
>
> Alex
> ______________________________________________________________________
> XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!		
> Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
>
>
>   



More information about the jcifs mailing list