As always, a reset returns UNWILLING_TO_PERFORM even though it is
pretending to be a change due to the control.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12020
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
^samba4\.ldap\.passwords\.python.+test_unicodePwd_policy_hints_history
^samba4\.ldap\.passwords\.python.+test_unicodePwd_policy_hints_deprecated_history
-^samba4\.ldap\.passwords\.python.+test_unicodePwd_policy_hints_deprecated_password_age
/* Password minimum age: yes, this is a minus. The ages are in negative 100nsec units! */
if ((io->u.pwdLastSet - io->ac->status->domain_data.minPwdAge > io->g.last_set) &&
- !io->ac->pwd_reset)
- {
- ret = LDB_ERR_CONSTRAINT_VIOLATION;
+ (!io->ac->pwd_reset || io->ac->policy_hints_reset_is_change)) {
+ if (io->ac->pwd_reset) {
+ ret = LDB_ERR_UNWILLING_TO_PERFORM;
+ } else {
+ ret = LDB_ERR_CONSTRAINT_VIOLATION;
+ }
*werror = WERR_PASSWORD_RESTRICTION;
ldb_asprintf_errstring(ldb,
"%08X: %s - check_password_restrictions: "