diff options
author | Simo Sorce <idra@samba.org> | 2006-05-22 15:17:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:25 -0500 |
commit | d6aaca599b8094b47246dd341dde165f204df090 (patch) | |
tree | 92a3f90dd69910bc32c16e05865cce430f449193 /source4 | |
parent | 184c28844d9a2186053ea23920607831299100a7 (diff) | |
download | samba-d6aaca599b8094b47246dd341dde165f204df090.tar.gz samba-d6aaca599b8094b47246dd341dde165f204df090.tar.bz2 samba-d6aaca599b8094b47246dd341dde165f204df090.zip |
r15804: Fix SAMLOGON test
(This used to be commit 2e9a840bb975f3269de4ca299a3d6e5b19f3cad1)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 11 |
1 files changed, 5 insertions, 6 deletions
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; } |