diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 414f79ea10..0530c63774 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -561,7 +561,8 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r } /* If the original caller did anything with pwdLastSet then skip this. It could be an incoming samsync */ - if ((attribute = ldb_msg_find_element(msg, "pwdLastSet")) == NULL ) { + attribute = ldb_msg_find_element(msg, "pwdLastSet"); + if (attribute == NULL) { /* Update the password last set time */ unix_to_nt_time(&now_nt, now); CHECK_RET(ldb_msg_add_empty(modify_msg, "pwdLastSet", LDB_FLAG_MOD_REPLACE)); @@ -569,7 +570,8 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r } /* If the original caller did anything with "msDS-KeyVersionNumber" then skip this. It could be an incoming samsync */ - if ((attribute = ldb_msg_find_element(msg, "msDS-KeyVersionNumber")) == NULL ) { + attribute = ldb_msg_find_element(msg, "msDS-KeyVersionNumber"); + if (attribute == NULL) { if (kvno == 0) { CHECK_RET(ldb_msg_add_empty(modify_msg, "msDS-KeyVersionNumber", LDB_FLAG_MOD_REPLACE)); |