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/ldap | |
| parent | 05a3a63f0fb79e713afdd3311107542a77739853 (diff) | |
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/ldap')
| -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 |
10 files changed, 22 insertions, 22 deletions
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); |
