From b53b3fa2a0ec6f2dd00dab417a9ee2bcc67ac242 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 7 Nov 2013 17:04:14 +1300 Subject: [PATCH] torture-samr: Try breaking the NT hash first, as the LM hash may not be being checked Change-Id: Iea9040bc7130f8b779c35bd367a9915633cd494d Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher --- source4/torture/rpc/samr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index a916d9f955e..00da5fe2438 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -1741,8 +1741,8 @@ static bool test_ChangePasswordUser(struct dcerpc_binding_handle *b, r.in.user_handle = &user_handle; r.in.lm_present = 1; - /* Break the LM hash */ - hash1.hash[0]++; + /* Break the NT hash */ + hash3.hash[0]++; r.in.old_lm_crypted = &hash1; r.in.new_lm_crypted = &hash2; r.in.nt_present = 1; @@ -1769,15 +1769,15 @@ static bool test_ChangePasswordUser(struct dcerpc_binding_handle *b, "ChangePasswordUser failed: expected NT_STATUS_WRONG_PASSWORD because we broke the LM hash"); } - /* Unbreak the LM hash */ - hash1.hash[0]--; + /* Unbreak the NT hash */ + hash3.hash[0]--; r.in.user_handle = &user_handle; r.in.lm_present = 1; r.in.old_lm_crypted = &hash1; r.in.new_lm_crypted = &hash2; - /* Break the NT hash */ - hash3.hash[0]--; + /* Break the LM hash */ + hash1.hash[0]--; r.in.nt_present = 1; r.in.old_nt_crypted = &hash3; r.in.new_nt_crypted = &hash4; -- 2.34.1