From: Stefan Metzmacher Date: Tue, 31 May 2016 13:21:58 +0000 (+0200) Subject: s4:dsdb/password_hash: handle the DSDB_CONTROL_PASSWORD_DEFAULT_LAST_SET control X-Git-Tag: tdb-1.3.10~664 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e536dbd4477cffd4c8cae35b7f01321e49aa4b93;p=thirdparty%2Fsamba.git s4:dsdb/password_hash: handle the DSDB_CONTROL_PASSWORD_DEFAULT_LAST_SET control BUG: https://bugzilla.samba.org/show_bug.cgi?id=9654 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 946ab34a785..af7ed551c51 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -101,6 +101,7 @@ struct ph_context { bool update_password; bool update_lastset; bool pwd_last_set_bypass; + bool pwd_last_set_default; }; @@ -2851,6 +2852,16 @@ static void ph_apply_controls(struct ph_context *ac) /* Mark the "bypass pwdLastSet" control as uncritical (done) */ ctrl->critical = false; } + + ac->pwd_last_set_default = false; + ctrl = ldb_request_get_control(ac->req, + DSDB_CONTROL_PASSWORD_DEFAULT_LAST_SET_OID); + if (ctrl != NULL) { + ac->pwd_last_set_default = true; + + /* Mark the "bypass pwdLastSet" control as uncritical (done) */ + ctrl->critical = false; + } } static int ph_op_callback(struct ldb_request *req, struct ldb_reply *ares)