svn commit: samba r3977 - in branches/SAMBA_4_0/source: rpc_server/samr torture/rpc

tridge at samba.org tridge at samba.org
Fri Nov 26 05:58:03 GMT 2004


Author: tridge
Date: 2004-11-26 05:58:03 +0000 (Fri, 26 Nov 2004)
New Revision: 3977

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3977

Log:
fixed the lmPwdHash change in the rpc server (we were not fetching the
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)

Modified:
   branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c
   branches/SAMBA_4_0/source/torture/rpc/samr.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c	2004-11-25 23:05:43 UTC (rev 3976)
+++ branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c	2004-11-26 05:58:03 UTC (rev 3977)
@@ -251,7 +251,7 @@
 	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 };

Modified: branches/SAMBA_4_0/source/torture/rpc/samr.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/samr.c	2004-11-25 23:05:43 UTC (rev 3976)
+++ branches/SAMBA_4_0/source/torture/rpc/samr.c	2004-11-26 05:58:03 UTC (rev 3977)
@@ -1036,7 +1036,7 @@
 
 	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 @@
 
 	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);



More information about the samba-cvs mailing list