s4-dsdb ensure we honour the hash_values control, even for really odd hashes
authorAndrew Bartlett <abartlet@samba.org>
Thu, 11 Aug 2011 05:50:54 +0000 (15:50 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 13 Aug 2011 02:30:49 +0000 (12:30 +1000)
source4/dsdb/samdb/ldb_modules/password_hash.c

index 470a2b05a34d098ce3ca3c9ef687785ace80f0d2..02e68cd9190254d7f5731b5e2ba6dd620403af4b 100644 (file)
@@ -2195,7 +2195,8 @@ static int setup_io(struct ph_context *ac,
        }
 
        /* Checks and converts the actual "unicodePwd" attribute */
-       if (quoted_utf16 &&
+       if (!ac->hash_values &&
+           quoted_utf16 &&
            quoted_utf16->length >= 4 &&
            quoted_utf16->data[0] == '"' &&
            quoted_utf16->data[1] == 0 &&
@@ -2251,7 +2252,8 @@ static int setup_io(struct ph_context *ac,
        }
 
        /* Checks and converts the previous "unicodePwd" attribute */
-       if (old_quoted_utf16 &&
+       if (!ac->hash_values &&
+           old_quoted_utf16 &&
            old_quoted_utf16->length >= 4 &&
            old_quoted_utf16->data[0] == '"' &&
            old_quoted_utf16->data[1] == 0 &&