diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2008-06-02 19:45:16 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2008-06-02 19:45:16 +0000 |
| commit | 7da16b5b7cc56806bd7fbff3295ce9e9e18efba0 (patch) | |
| tree | 56e0af85ca50e2923edb459dab698c2705c55a15 /src/plugins/kdb | |
| parent | 05a3a63f0fb79e713afdd3311107542a77739853 (diff) | |
| download | krb5-7da16b5b7cc56806bd7fbff3295ce9e9e18efba0.tar.gz krb5-7da16b5b7cc56806bd7fbff3295ce9e9e18efba0.tar.xz krb5-7da16b5b7cc56806bd7fbff3295ce9e9e18efba0.zip | |
Change krb5_context.db_context to point to the real structure type,
and change uses to not cast all the time. Also rename it from
db_context to dal_handle, since one of the fields in the pointed-to
structure is also called db_context.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20348 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/kdb')
| -rw-r--r-- | src/plugins/kdb/db2/kdb_db2.c | 71 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c | 2 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c | 14 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c | 4 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c | 2 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h | 6 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c | 6 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c | 2 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c | 4 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c | 2 | ||||
| -rw-r--r-- | src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c | 2 |
11 files changed, 57 insertions, 58 deletions
diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c index eda5274d9..1026b7313 100644 --- a/src/plugins/kdb/db2/kdb_db2.c +++ b/src/plugins/kdb/db2/kdb_db2.c @@ -1,7 +1,7 @@ /* * lib/kdb/kdb_db2.c * - * Copyright 1997,2006,2007 by the Massachusetts Institute of Technology. + * Copyright 1997,2006,2007,2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -132,9 +132,9 @@ static char default_db_name[] = DEFAULT_KDB_FILE; /* * Routines to deal with context. */ -#define k5db2_inited(c) (c && c->db_context \ - && ((kdb5_dal_handle*)c->db_context)->db_context \ - && ((krb5_db2_context *) ((kdb5_dal_handle*)c->db_context)->db_context)->db_inited) +#define k5db2_inited(c) (c && c->dal_handle \ + && c->dal_handle->db_context \ + && ((krb5_db2_context *) c->dal_handle->db_context)->db_inited) static krb5_error_code krb5_db2_get_db_opt(char *input, char **opt, char **val) @@ -188,7 +188,7 @@ k5db2_init_context(krb5_context context) krb5_db2_context *db_ctx; kdb5_dal_handle *dal_handle; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; if (dal_handle->db_context == NULL) { db_ctx = (krb5_db2_context *) malloc(sizeof(krb5_db2_context)); @@ -287,7 +287,7 @@ krb5_db2_db_set_hashfirst(krb5_context context, int hashfirst) if (k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; dbc = (krb5_db2_context *) dal_handle->db_context; dbc->hashfirst = hashfirst; return 0; @@ -313,7 +313,7 @@ krb5_db2_db_init(krb5_context context) if ((retval = k5db2_init_context(context))) return (retval); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = dal_handle->db_context; db_ctx->db = NULL; @@ -368,7 +368,7 @@ krb5_db2_db_fini(krb5_context context) krb5_db2_context *db_ctx; kdb5_dal_handle *dal_handle; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; if (dal_handle == NULL) { return 0; } @@ -408,7 +408,7 @@ krb5_db2_db_set_mkey(krb5_context context, krb5_keyblock *key) if (!k5db2_inited(context)) return (KRB5_KDB_DBNOTINITED); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = dal_handle->db_context; db_ctx->db_master_key = key; return 0; @@ -423,7 +423,7 @@ krb5_db2_db_get_mkey(krb5_context context, krb5_keyblock **key) if (!k5db2_inited(context)) return (KRB5_KDB_DBNOTINITED); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = dal_handle->db_context; *key = db_ctx->db_master_key; @@ -457,7 +457,7 @@ krb5_db2_db_set_name(krb5_context context, char *name, int tempdb) if (name == NULL) name = default_db_name; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = dal_handle->db_context; db_ctx->tempdb = tempdb; db = k5db2_dbopen(db_ctx, name, O_RDONLY, 0, tempdb); @@ -484,7 +484,7 @@ krb5_db2_db_get_age(krb5_context context, char *db_name, time_t *age) if (!k5db2_inited(context)) return (KRB5_KDB_DBNOTINITED); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; if (fstat(db_ctx->db_lf_file, &st) < 0) @@ -522,7 +522,7 @@ krb5_db2_db_end_update(krb5_context context) return (KRB5_KDB_DBNOTINITED); retval = 0; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = dal_handle->db_context; now = time((time_t *) NULL); if (fstat(db_ctx->db_lf_file, &st) == 0) { @@ -577,7 +577,7 @@ krb5_db2_db_lock(krb5_context context, int in_mode) if (!k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; if (db_ctx->db_locks_held && (db_ctx->db_lock_mode >= mode)) { /* No need to upgrade lock, just return */ @@ -648,7 +648,7 @@ krb5_db2_db_unlock(krb5_context context) if (!k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; if ((retval = osa_adb_release_lock(db_ctx->policy_db))) { @@ -688,7 +688,7 @@ krb5_db2_db_create(krb5_context context, char *db_name, krb5_int32 flags) if ((retval = k5db2_init_context(context))) return (retval); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; switch (flags) { case KRB5_KDB_CREATE_HASH: @@ -835,8 +835,8 @@ krb5_db2_db_destroy(krb5_context context, char *dbname) char policy_db_name[1024], policy_lock_name[1024]; tmpcontext = 0; - if (!context->db_context - || !((kdb5_dal_handle *) context->db_context)->db_context) { + if (!context->dal_handle + || !context->dal_handle->db_context) { tmpcontext = 1; if ((retval1 = k5db2_init_context(context))) return (retval1); @@ -847,10 +847,9 @@ krb5_db2_db_destroy(krb5_context context, char *dbname) retval2 = destroy_file_suffix(dbname, KDB2_LOCK_EXT); if (tmpcontext) { - k5db2_clear_context((krb5_db2_context *) ((kdb5_dal_handle *) context-> - db_context)->db_context); - free(((kdb5_dal_handle *) context->db_context)->db_context); - ((kdb5_dal_handle *) context->db_context)->db_context = NULL; + k5db2_clear_context((krb5_db2_context *) context->dal_handle->db_context); + free(context->dal_handle->db_context); + context->dal_handle->db_context = NULL; } if (retval1 || retval2) @@ -893,7 +892,7 @@ krb5_db2_db_get_principal(krb5_context context, if (!k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; for (trynum = 0; trynum < KRB5_DB2_MAX_RETRY; trynum++) { @@ -991,7 +990,7 @@ krb5_db2_db_put_principal(krb5_context context, if (!k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; if ((retval = krb5_db2_db_lock(context, KRB5_LOCKMODE_EXCLUSIVE))) return retval; @@ -1054,7 +1053,7 @@ krb5_db2_db_delete_principal(krb5_context context, if (!k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; if ((retval = krb5_db2_db_lock(context, KRB5_LOCKMODE_EXCLUSIVE))) return (retval); @@ -1141,7 +1140,7 @@ krb5_db2_db_iterate_ext(krb5_context context, if (!k5db2_inited(context)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; retval = krb5_db2_db_lock(context, KRB5_LOCKMODE_SHARED); @@ -1216,7 +1215,7 @@ krb5_db2_db_set_lockmode(krb5_context context, krb5_boolean mode) krb5_db2_context *db_ctx; kdb5_dal_handle *dal_handle; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; old = mode; if (dal_handle && (db_ctx = (krb5_db2_context *) dal_handle->db_context)) { old = db_ctx->db_nb_locks; @@ -1498,7 +1497,7 @@ krb5_db2_db_set_option(krb5_context kcontext, int option, void *value) if (!k5db2_inited(kcontext)) return KRB5_KDB_DBNOTINITED; - dal_handle = (kdb5_dal_handle *) kcontext->db_context; + dal_handle = kcontext->dal_handle; db_ctx = (krb5_db2_context *) dal_handle->db_context; @@ -1539,7 +1538,7 @@ krb5_db2_create_policy(krb5_context kcontext, osa_policy_ent_t policy) kdb5_dal_handle *dal_handle; krb5_db2_context *dbc; - dal_handle = (kdb5_dal_handle *) kcontext->db_context; + dal_handle = kcontext->dal_handle; dbc = (krb5_db2_context *) dal_handle->db_context; return osa_adb_create_policy(dbc->policy_db, policy); @@ -1552,7 +1551,7 @@ krb5_db2_get_policy(krb5_context kcontext, kdb5_dal_handle *dal_handle; krb5_db2_context *dbc; - dal_handle = (kdb5_dal_handle *) kcontext->db_context; + dal_handle = kcontext->dal_handle; dbc = (krb5_db2_context *) dal_handle->db_context; return osa_adb_get_policy(dbc->policy_db, name, policy, cnt); @@ -1564,7 +1563,7 @@ krb5_db2_put_policy(krb5_context kcontext, osa_policy_ent_t policy) kdb5_dal_handle *dal_handle; krb5_db2_context *dbc; - dal_handle = (kdb5_dal_handle *) kcontext->db_context; + dal_handle = kcontext->dal_handle; dbc = (krb5_db2_context *) dal_handle->db_context; return osa_adb_put_policy(dbc->policy_db, policy); @@ -1578,7 +1577,7 @@ krb5_db2_iter_policy(krb5_context kcontext, kdb5_dal_handle *dal_handle; krb5_db2_context *dbc; - dal_handle = (kdb5_dal_handle *) kcontext->db_context; + dal_handle = kcontext->dal_handle; dbc = (krb5_db2_context *) dal_handle->db_context; return osa_adb_iter_policy(dbc->policy_db, func, data); @@ -1590,7 +1589,7 @@ krb5_db2_delete_policy(krb5_context kcontext, char *policy) kdb5_dal_handle *dal_handle; krb5_db2_context *dbc; - dal_handle = (kdb5_dal_handle *) kcontext->db_context; + dal_handle = kcontext->dal_handle; dbc = (krb5_db2_context *) dal_handle->db_context; return osa_adb_destroy_policy(dbc->policy_db, policy); @@ -1615,12 +1614,12 @@ krb5_db2_promote_db(krb5_context kcontext, char *conf_section, char **db_args) krb5_clear_error_message (kcontext); { - kdb5_dal_handle *dal_handle = kcontext->db_context; + kdb5_dal_handle *dal_handle = kcontext->dal_handle; krb5_db2_context *db_ctx = dal_handle->db_context; db_name = strdup(db_ctx->db_name); } - assert(kcontext->db_context != NULL); + assert(kcontext->dal_handle != NULL); temp_db_name = gen_dbsuffix(db_name, "~"); if (temp_db_name == NULL) { status = ENOMEM; @@ -1660,7 +1659,7 @@ krb5_db2_db_rename(context, from, to) char *fromok; krb5_error_code retval; krb5_db2_context *s_context, *db_ctx; - kdb5_dal_handle *dal_handle = context->db_context; + kdb5_dal_handle *dal_handle = context->dal_handle; s_context = dal_handle->db_context; dal_handle->db_context = NULL; diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c index 7a6c6411e..f75819a14 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_policy.c @@ -56,7 +56,7 @@ static krb5_error_code init_ldap_realm (int argc, char *argv[]) { kdb5_dal_handle *dal_handle = NULL; krb5_ldap_context *ldap_context=NULL; - dal_handle = (kdb5_dal_handle *) util_context->db_context; + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!ldap_context) { retval = EINVAL; diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c index 1a0d9fa99..4a64143de 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c @@ -1,7 +1,7 @@ /* * kadmin/ldap_util/kdb5_ldap_realm.c * - * Copyright 1990,1991,2001, 2002 by the Massachusetts Institute of Technology. + * Copyright 1990,1991,2001, 2002, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -521,7 +521,7 @@ void kdb5_ldap_create(argc, argv) goto err_nomsg; } - dal_handle = (kdb5_dal_handle *) util_context->db_context; + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!ldap_context) { retval = EINVAL; @@ -923,7 +923,7 @@ void kdb5_ldap_modify(argc, argv) int subtree_changed = 0; #endif - dal_handle = (kdb5_dal_handle *) util_context->db_context; + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!(ldap_context)) { retval = EINVAL; @@ -1800,7 +1800,7 @@ void kdb5_ldap_view(argc, argv) krb5_ldap_context *ldap_context=NULL; int mask = 0; - dal_handle = (kdb5_dal_handle *) util_context->db_context; + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!(ldap_context)) { retval = EINVAL; @@ -1998,7 +1998,7 @@ void kdb5_ldap_list(argc, argv) kdb5_dal_handle *dal_handle=NULL; krb5_ldap_context *ldap_context=NULL; - dal_handle = (kdb5_dal_handle *)util_context->db_context; + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!(ldap_context)) { retval = EINVAL; @@ -2239,7 +2239,7 @@ kdb_ldap_create_principal (context, princ, op, pblock) retval = EINVAL; goto cleanup; } - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!(ldap_context)) { retval = EINVAL; @@ -2431,7 +2431,7 @@ kdb5_ldap_destroy(argc, argv) printf("OK, deleting database of '%s'...\n", global_params.realm); } - dal_handle = (kdb5_dal_handle *)util_context->db_context; + dal_handle = util_context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (!(ldap_context)) { com_err(argv[0], EINVAL, "while initializing database"); diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c index 9fcc7b79d..34a2fc808 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.c @@ -1,7 +1,7 @@ /* * kadmin/ldap_util/kdb5_ldap_util.c * - * (C) Copyright 1990,1991, 1996 by the Massachusetts Institute of Technology. + * (C) Copyright 1990,1991, 1996, 2008 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -579,7 +579,7 @@ int main(argc, argv) goto cleanup; } dal_handle->db_context = ldap_context; - util_context->db_context = (void *) dal_handle; + util_context->dal_handle = dal_handle; db_retval = krb5_ldap_read_server_params(util_context, conf_section, KRB5_KDB_SRV_TYPE_OTHER); if (db_retval) { diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c index 40bde9e21..d7f63d0a8 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.c @@ -441,7 +441,7 @@ krb5_error_code krb5_ldap_open(krb5_context context, t_ptr++; } - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; dal_handle->db_context = ldap_context; status = krb5_ldap_read_server_params(context, conf_section, mode & 0x0300); if (status) { diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h index 4cd137067..918c6bcf3 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h @@ -77,11 +77,11 @@ extern struct timeval timelimit; #define IGNORE_STATUS 0 #define CHECK_STATUS 1 -#define SETUP_CONTEXT() if (context == NULL || context->db_context == NULL \ - || ((kdb5_dal_handle *)context->db_context)->db_context == NULL) { \ +#define SETUP_CONTEXT() if (context == NULL || context->dal_handle == NULL \ + || context->dal_handle->db_context == NULL) { \ return EINVAL; \ } \ - dal_handle = (kdb5_dal_handle *)context->db_context; \ + dal_handle = context->dal_handle; \ ldap_context = (krb5_ldap_context *) dal_handle->db_context; \ if (ldap_context == NULL || ldap_context->server_info_list == NULL) \ return KRB5_KDB_DBNOTINITED; diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c index 343705efc..8494681a1 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c @@ -338,11 +338,11 @@ krb5_ldap_close(krb5_context context) krb5_ldap_context *ldap_context=NULL; if (context == NULL || - context->db_context == NULL || - ((kdb5_dal_handle *)context->db_context)->db_context == NULL) + context->dal_handle == NULL || + context->dal_handle->db_context == NULL) return 0; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; dal_handle->db_context = NULL; diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c index 8c60c177d..124396f3f 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c @@ -250,7 +250,7 @@ krb5_ldap_create (krb5_context context, char *conf_section, char **db_args) t_ptr++; } - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; dal_handle->db_context = (kdb5_dal_handle *) ldap_context; status = krb5_ldap_read_server_params(context, conf_section, KRB5_KDB_SRV_TYPE_ADMIN); diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c index c159f0014..9a364192a 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_fetch_mkey.c @@ -47,7 +47,7 @@ krb5_ldap_get_mkey (context, key) /* Clear the global error string */ krb5_clear_error_message(context); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (ldap_context == NULL || ldap_context->lrparams == NULL) @@ -75,7 +75,7 @@ krb5_ldap_set_mkey (context, pwd, key) /* Clear the global error string */ krb5_clear_error_message(context); - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; if (ldap_context == NULL || ldap_context->lrparams == NULL) diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c index 11c5caae3..818b2e55c 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c @@ -152,7 +152,7 @@ krb5_ldap_read_server_params(context, conf_section, srv_type) krb5_ldap_context *ldap_context=NULL; krb5_ldap_server_info ***server_info=NULL; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; /* copy the conf_section into ldap_context for later use */ diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c index 7926484c7..7819ddd95 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c @@ -102,7 +102,7 @@ krb5_ldap_get_principal(context, searchfor, entries, nentries, more) if (searchfor == NULL) return EINVAL; - dal_handle = (kdb5_dal_handle *) context->db_context; + dal_handle = context->dal_handle; ldap_context = (krb5_ldap_context *) dal_handle->db_context; CHECK_LDAP_HANDLE(ldap_context); |
