svn commit: samba r15804 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

idra at samba.org idra at samba.org
Mon May 22 15:17:13 GMT 2006


Author: idra
Date: 2006-05-22 15:17:12 +0000 (Mon, 22 May 2006)
New Revision: 15804

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

Log:

Fix SAMLOGON test


Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c	2006-05-22 14:18:17 UTC (rev 15803)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c	2006-05-22 15:17:12 UTC (rev 15804)
@@ -769,23 +769,22 @@
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
-	/* compute the new nt and lm hashes */
 	if (is_mod) {
 		if (ldb_msg_add_empty(msg, "ntPwdHash", LDB_FLAG_MOD_REPLACE) != 0) {
 			return LDB_ERR_OPERATIONS_ERROR;
 		}
+		if (ldb_msg_add_empty(msg, "lmPwdHash", LDB_FLAG_MOD_REPLACE) != 0) {
+			return LDB_ERR_OPERATIONS_ERROR;
+		}
 	}	
+
+	/* compute the new nt and lm hashes */
 	E_md4hash(sambaPassword, tmp_hash.hash);
 	if (samdb_msg_add_hash(module->ldb, msg, msg, "ntPwdHash", &tmp_hash) != 0) {
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
 	if (E_deshash(sambaPassword, tmp_hash.hash)) {
-		if (is_mod) {
-			if (ldb_msg_add_empty(msg, "lmPwdHash", LDB_FLAG_MOD_REPLACE) != 0) {
-				return LDB_ERR_OPERATIONS_ERROR;
-			}
-		}
 		if (samdb_msg_add_hash(module->ldb, msg, msg, "lmPwdHash", &tmp_hash) != 0) {
 			return LDB_ERR_OPERATIONS_ERROR;
 		}



More information about the samba-cvs mailing list