From 06a6194eadef9fa9c9f6b3c200c41d2a59dc76af Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 27 Jul 2007 06:31:12 +0000 Subject: r24061: Anther part of bug #4823, which is that until now Samba4 didn't parse the logon hours, even if set. This code happily stolen from the great work in Samba3 :-) Andrew Bartlett (This used to be commit a4939ab629e0af0615bcecf63c7cd55e6e833505) --- source4/kdc/hdb-ldb.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'source4/kdc/hdb-ldb.c') diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c index 62fcf0cb00..ddee8d19d1 100644 --- a/source4/kdc/hdb-ldb.c +++ b/source4/kdc/hdb-ldb.c @@ -54,29 +54,6 @@ enum hdb_ldb_ent_type { HDB_LDB_ENT_TYPE_CLIENT, HDB_LDB_ENT_TYPE_SERVER, HDB_LDB_ENT_TYPE_KRBTGT, HDB_LDB_ENT_TYPE_ANY }; -static const char * const krb5_attrs[] = { - "objectClass", - "sAMAccountName", - - "userPrincipalName", - "servicePrincipalName", - - "userAccountControl", - - "pwdLastSet", - "accountExpires", - - "whenCreated", - "whenChanged", - - "msDS-KeyVersionNumber", - - "unicodePwd", - "supplementalCredentials", - - NULL -}; - static const char *realm_ref_attrs[] = { "nCName", "dnsRoot", @@ -615,7 +592,7 @@ static krb5_error_code LDB_lookup_principal(krb5_context context, struct ldb_con krb5_error_code ret; int lret; char *filter = NULL; - const char * const *princ_attrs = krb5_attrs; + const char * const *princ_attrs = user_attrs; char *short_princ; char *short_princ_talloc; @@ -886,7 +863,7 @@ static krb5_error_code LDB_fetch_server(krb5_context context, HDB *db, } ldb_ret = gendb_search_dn((struct ldb_context *)db->hdb_db, - mem_ctx, user_dn, &msg, krb5_attrs); + mem_ctx, user_dn, &msg, user_attrs); if (ldb_ret != 1) { return HDB_ERR_NOENTRY; @@ -1083,7 +1060,7 @@ static krb5_error_code LDB_firstkey(krb5_context context, HDB *db, unsigned flag lret = ldb_search(ldb_ctx, realm_dn, LDB_SCOPE_SUBTREE, "(objectClass=user)", - krb5_attrs, &res); + user_attrs, &res); if (lret != LDB_SUCCESS) { talloc_free(priv); -- cgit