from jcifs-1.3.2.tgz
authorFelix Schumacher <p0354740@isib001.(none)>
Tue, 23 Dec 2008 14:27:09 +0000 (15:27 +0100)
committerFelix Schumacher <p0354740@isib001.(none)>
Tue, 23 Dec 2008 14:27:09 +0000 (15:27 +0100)
Mon Dec 22 13:30:39 EST 2008
jcifs-1.3.2

Querying Samba DFS links directly could fail due to a slight difference
in Samba v. Windows DFS referrals. This issue has been fixed. Querying
Samba DFS roots or paths under DFS links were not affected.

README.txt
build.xml
src/jcifs/dcerpc/UUID.java
src/jcifs/smb/Dfs.java
src/jcifs/smb/NtlmPasswordAuthentication.java
src/jcifs/smb/SID.java

index 52826a9..ea8c302 100644 (file)
@@ -1,3 +1,10 @@
+Mon Dec 22 13:30:39 EST 2008
+jcifs-1.3.2
+
+Querying Samba DFS links directly could fail due to a slight difference
+in Samba v. Windows DFS referrals. This issue has been fixed. Querying
+Samba DFS roots or paths under DFS links were not affected.
+
 Sat Nov 30 00:32:09 EST 2008
 jcifs-1.3.1
 
index 1efcea8..af58471 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
 <project name="jcifs" default="usage" basedir=".">
 
-    <property name="version" value="1.3.1"/>
-    <property name="reldate" value="Nov 30, 2008"/>
+    <property name="version" value="1.3.2"/>
+    <property name="reldate" value="Dec 22, 2008"/>
 
     <target name="usage">
         <echo>
index b36e566..8f07f3f 100644 (file)
@@ -64,6 +64,20 @@ public class UUID extends rpc.uuid_t {
     private static byte B(int i) { return (byte)(i & 0xFF); }
     private static short S(int i) { return (short)(i & 0xFFFF); }
 
+    public UUID(rpc.uuid_t uuid) {
+        time_low = uuid.time_low;
+        time_mid = uuid.time_mid;
+        time_hi_and_version = uuid.time_hi_and_version;
+        clock_seq_hi_and_reserved = uuid.clock_seq_hi_and_reserved;
+        clock_seq_low = uuid.clock_seq_low;
+        node = new byte[6];
+        node[0] = uuid.node[0];
+        node[1] = uuid.node[1];
+        node[2] = uuid.node[2];
+        node[3] = uuid.node[3];
+        node[4] = uuid.node[4];
+        node[5] = uuid.node[5];
+    }
     public UUID(String str) {
         char[] arr = str.toCharArray();
         time_low = hex_to_bin(arr, 0, 8);
index c9ff674..13d6895 100644 (file)
@@ -248,6 +248,21 @@ public class Dfs {
         share = path.substring(s1 + 1, s2);
 
         key = path.substring(0, dr.pathConsumed).toLowerCase();
+
+        /* Samba has a tendency to return referral paths and pathConsumed values
+         * in such a way that there can be a slash at the end of the path. This
+         * causes problems matching keys in resolve() where an extra slash causes
+         * a mismatch. This strips trailing slashes from all keys to eliminate
+         * this problem.
+         */
+        int ki = key.length();
+        while (ki > 1 && key.charAt(ki - 1) == '\\') {
+            ki--;
+        }
+        if (ki < key.length()) {
+            key = key.substring(0, ki);
+        }
+
         /* Subtract the server and share from the pathConsumed so that
          * it refects the part of the relative path consumed and not
          * the entire path.
index 125f1c4..845407e 100644 (file)
@@ -145,6 +145,7 @@ public final class NtlmPasswordAuthentication implements Principal, Serializable
         try {
             byte[] hash = new byte[16];
             byte[] response = new byte[24];
+// The next 2-1/2 lines of this should be placed with nTOWFv1 in place of password
             MD4 md4 = new MD4();
             md4.update(password.getBytes("UnicodeLittleUnmarked"));
             HMACT64 hmac = new HMACT64(md4.digest());
index cbb8020..c68875e 100644 (file)
@@ -315,7 +315,7 @@ public class SID extends rpc.sid_t {
         }
         this.sub_authority[i] = rid;
     }
-    SID(rpc.sid_t sid,
+    public SID(rpc.sid_t sid,
                     int type,
                     String domainName,
                     String acctName,