s4:kdc: use "msDS-UserPasswordExpiryTimeComputed" instead of samdb_result_force_passw...
authorStefan Metzmacher <metze@samba.org>
Fri, 3 Jun 2016 22:48:56 +0000 (00:48 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Jun 2016 01:30:23 +0000 (03:30 +0200)
The logic in samdb_result_force_password_change() is incomplete
and the correct logic is already available via the constructed
"msDS-UserPasswordExpiryTimeComputed" attribute.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11441

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/db-glue.c

index af9fa268b325c11e6df43ae5ba54a765bdd77e2d..963c64102d15a8746d90d47c4033db496d4291d0 100644 (file)
@@ -880,8 +880,9 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
 
        } else {
                NTTIME must_change_time
-                       = samdb_result_force_password_change(kdc_db_ctx->samdb, mem_ctx,
-                                                            realm_dn, msg);
+                       = samdb_result_nttime(msg,
+                                       "msDS-UserPasswordExpiryTimeComputed",
+                                       0);
                if (must_change_time == 0x7FFFFFFFFFFFFFFFULL) {
                        entry_ex->entry.pw_end = NULL;
                } else {