r3977: fixed the lmPwdHash change in the rpc server (we were not fetching the
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Nov 2004 05:58:03 +0000 (05:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:06:10 +0000 (13:06 -0500)
lm hash from the samdb, and thus not checking the verifier)

fixed the client side to calculate the lm verifier based on the nt
hash, not the lm hash (confirmed using w2k3)
(This used to be commit 27e7fb3bafe4649359e2e68169b6f10fd4d2cc70)

source4/rpc_server/samr/samr_password.c
source4/torture/rpc/samr.c

index 787061602c926f13b9ea58fa62ffd8e88d89a502..a3a1d2230f8f1b0f1fc6a8ca398e5dc3003576fe 100644 (file)
@@ -251,7 +251,7 @@ NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
        const char *user_dn, *domain_dn = NULL;
        int ret;
        struct ldb_message **res, mod;
-       const char * const attrs[] = { "objectSid", "ntPwdHash", "unicodePwd", NULL };
+       const char * const attrs[] = { "objectSid", "ntPwdHash", "lmPwdHash", "unicodePwd", NULL };
        const char * const dom_attrs[] = { "minPwdLength", "pwdHistoryLength", 
                                           "pwdProperties", "minPwdAge", "maxPwdAge", 
                                           NULL };
index a4eb1de1425d1c25108fe8a9ecf33d40b71bbb8c..370f309b6c8ea3aa73c41449d1eacf0fd3147e43 100644 (file)
@@ -1036,7 +1036,7 @@ static BOOL test_ChangePasswordUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        encode_pw_buffer(lm_pass.data, newpass, STR_ASCII|STR_TERMINATE);
        arcfour_crypt(lm_pass.data, old_lm_hash, 516);
-       E_old_pw_hash(new_lm_hash, old_lm_hash, lm_verifier.hash);
+       E_old_pw_hash(new_nt_hash, old_lm_hash, lm_verifier.hash);
 
        encode_pw_buffer(nt_pass.data, newpass, STR_UNICODE);
        arcfour_crypt(nt_pass.data, old_nt_hash, 516);
@@ -1091,7 +1091,7 @@ static BOOL test_ChangePasswordUser3(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        encode_pw_buffer(lm_pass.data, newpass, STR_UNICODE);
        arcfour_crypt(lm_pass.data, old_nt_hash, 516);
-       E_old_pw_hash(new_lm_hash, old_lm_hash, lm_verifier.hash);
+       E_old_pw_hash(new_nt_hash, old_lm_hash, lm_verifier.hash);
 
        encode_pw_buffer(nt_pass.data, newpass, STR_UNICODE);
        arcfour_crypt(nt_pass.data, old_nt_hash, 516);