summaryrefslogtreecommitdiff
path: root/source4/kdc/hdb-ldb.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-03-07 03:33:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:22 -0500
commit61fe79d02200ef4f23652efe5995c84bbacd220a (patch)
treebfd4af7968742bee23d458ed4b139a8d933bab0f /source4/kdc/hdb-ldb.c
parent6a73835b0946a015d1bad0b502c35d92777d2446 (diff)
downloadsamba-61fe79d02200ef4f23652efe5995c84bbacd220a.tar.gz
samba-61fe79d02200ef4f23652efe5995c84bbacd220a.tar.bz2
samba-61fe79d02200ef4f23652efe5995c84bbacd220a.zip
r13910: Fix the 'your password has expired' on every login. We now consider
if the 'password does not expire' flag has been set, filling in the PAC and netlogon reply correctly if so. Andrew Bartlett (This used to be commit c530ab5dc6865c422382bc0afa7a86f7ec1acdf2)
Diffstat (limited to 'source4/kdc/hdb-ldb.c')
-rw-r--r--source4/kdc/hdb-ldb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 0306bf3106..5766a9acfa 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -355,21 +355,19 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
*entry_ex->entry.valid_end = nt_time_to_unix(acct_expiry);
}
- if (!(userAccountControl & UF_DONT_EXPIRE_PASSWD) &&
- (ent_type != HDB_LDB_ENT_TYPE_KRBTGT)) {
+ if (ent_type != HDB_LDB_ENT_TYPE_KRBTGT) {
NTTIME must_change_time
= samdb_result_force_password_change((struct ldb_context *)db->hdb_db, mem_ctx,
- domain_dn, msg,
- "pwdLastSet");
- if (must_change_time != 0) {
+ domain_dn, msg);
+ if (must_change_time == 0x7FFFFFFFFFFFFFFFULL) {
+ entry_ex->entry.pw_end = NULL;
+ } else {
entry_ex->entry.pw_end = malloc(sizeof(*entry_ex->entry.pw_end));
if (entry_ex->entry.pw_end == NULL) {
ret = ENOMEM;
goto out;
}
*entry_ex->entry.pw_end = nt_time_to_unix(must_change_time);
- } else {
- entry_ex->entry.pw_end = NULL;
}
} else {
entry_ex->entry.pw_end = NULL;