From d6aaca599b8094b47246dd341dde165f204df090 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 22 May 2006 15:17:12 +0000 Subject: r15804: Fix SAMLOGON test (This used to be commit 2e9a840bb975f3269de4ca299a3d6e5b19f3cad1) --- source4/dsdb/samdb/ldb_modules/password_hash.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source4') diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index c1eb244e19..1a2ca629bc 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -769,23 +769,22 @@ static int add_password_hashes(struct ldb_module *module, struct ldb_message *ms 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; } -- cgit