summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-12-01 04:50:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:55 -0500
commit36b21c951debf43b95ae9166a5eb63ed610db2b1 (patch)
tree1c5199c03bf53cad1dcf483634d2e12dbb04b3c1 /source4
parent4476dfd3bd34be68793a02ce0722b729528058fa (diff)
downloadsamba-36b21c951debf43b95ae9166a5eb63ed610db2b1.tar.gz
samba-36b21c951debf43b95ae9166a5eb63ed610db2b1.tar.bz2
samba-36b21c951debf43b95ae9166a5eb63ed610db2b1.zip
r11987: Clarify the accountExpires behaviour in the KDC.
Andrew Bartlett (This used to be commit 05334e98fb1658965a822517365a86bc3906378b)
Diffstat (limited to 'source4')
-rw-r--r--source4/kdc/hdb-ldb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index bc83973e93..5820ba1330 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -310,16 +310,17 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
ent->valid_start = NULL;
- acct_expiry = samdb_result_nttime(msg, "accountExpires", -1LL);
- if (acct_expiry != -1LL && acct_expiry != 0x7FFFFFFFFFFFFFFFLL) {
+ acct_expiry = samdb_result_nttime(msg, "accountExpires", (NTTIME)-1);
+ if ((acct_expiry == (NTTIME)-1) ||
+ (acct_expiry == 0x7FFFFFFFFFFFFFFFULL)) {
+ ent->valid_end = NULL;
+ } else {
ent->valid_end = malloc(sizeof(*ent->valid_end));
if (ent->valid_end == NULL) {
ret = ENOMEM;
goto out;
}
*ent->valid_end = nt_time_to_unix(acct_expiry);
- } else {
- ent->valid_end = NULL;
}
if ((ent_type != HDB_LDB_ENT_TYPE_KRBTGT) && (!(userAccountControl & UF_DONT_EXPIRE_PASSWD))) {