summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-11 15:50:54 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-13 12:30:49 +1000
commit11698a287e2ca1e937a465225af033e269749eb3 (patch)
tree514ce24004b447c0e877855a5eb1f3c900564808
parent2d6e98e5c8f44b20b1f071c34ff791e39d3bb052 (diff)
downloadsamba-11698a287e2ca1e937a465225af033e269749eb3.tar.gz
samba-11698a287e2ca1e937a465225af033e269749eb3.tar.bz2
samba-11698a287e2ca1e937a465225af033e269749eb3.zip
s4-dsdb ensure we honour the hash_values control, even for really odd hashes
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 470a2b05a3..02e68cd919 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -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 &&