[jcifs] 1.2.12 heads-up about SID.toString()

Thomas Bley thomas.bley at simple-groupware.de
Fri Dec 15 06:01:00 GMT 2006


I did a short check with 1.2.12b and dfs with a W2k3 Sp1 / WinXP:

- calling getDfsPath() throws java.lang.StringIndexOutOfBoundsException
in getDfsUncPath0:
I think the problem is here when unc is \ and dfsReferral.path is for
example \vdir4: unc.substring( dfsReferral.path.length() )

- Dfs-links pointing to Dfs-links give the wrong directory content

- Dfs-links pointing to another server give access denied when an
accessing a second time:

I don't know if this is a jCIFS issue, the Ethereal dump looks a bit
strange, since the second Find_First2 gives "Access_Denied" instead of
"Path_not_covered", maybe a problem with the w2k3 server ? (see the
dumps, esp. dfs1.dump)

The structure:
- // points to //
- // points to //
- MyRoot is the dfs-root, is the win2k3 sp1 machine, is a WinXP sp2

The code:
     public static NtlmPasswordAuthentication ntlm = new

     public static void queryPath(String path) throws Exception {
         System.out.println("Query url "+path);
         SmbFile file0 = new SmbFile( path, ntlm );
         SmbFile[] files0 = file0.listFiles();
         for( int i = 0; i < files0.length; i++ ) {
             System.out.print( " " + files0[i].getName()+"#\n" );

     public static void main( String[] argv ) throws Exception {

The output:
Query url smb://
Query url smb://
Exception in thread "main" jcifs.smb.SmbAuthException: Access is denied.
     at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:504)
     at jcifs.smb.SmbTransport.send(SmbTransport.java:592)
     at jcifs.smb.SmbSession.send(SmbSession.java:239)
     at jcifs.smb.SmbTree.send(SmbTree.java:109)
     at jcifs.smb.SmbFile.send(SmbFile.java:696)
     at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1800)
     at jcifs.smb.SmbFile.listFiles(SmbFile.java:1637)
     at jcifs.smb.SmbFile.listFiles(SmbFile.java:1521)
     at ListFilesDfs.queryPath(ListFilesDfs.java:13)
     at ListFilesDfs.main(ListFilesDfs.java:24)


Michael B Allen wrote:
> Please be advised that the SID.toString() method behavior will be
> rolled back to 1.2.10 behavior which is to return the numeric SID
> representation. The SID.toString() bahavior change was inappropriate
> and broke backwards compatibility. To get the Windows ACL editor display
> string a new SID.toDisplayString() method has been added.
> If you would like to try this or you are actively coding an application
> that will depend on forward compatibility (JG) please try 1.2.12b in the
> download area.
> As soon as I get feedback on a possibly significant DFS change in 1.2.12b
> I will make it "final".
> Mike

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dfs1.dump
Type: application/octet-stream
Size: 2728 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20061215/c0bd8585/dfs1-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dfs1b.dump
Type: application/octet-stream
Size: 2411 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20061215/c0bd8585/dfs1b-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dfs1a.dump
Type: application/octet-stream
Size: 4629 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20061215/c0bd8585/dfs1a-0001.obj

More information about the jcifs mailing list