aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Howard <lukeh@padl.com>2009-10-01 22:27:51 +0000
committerLuke Howard <lukeh@padl.com>2009-10-01 22:27:51 +0000
commit5758a2caa165c3848a67b63fe73afb5256069af7 (patch)
tree6fecb4021ef90482eec53b610b8795949da92aef
parentb66878847ad0659a240a74427ed32cf1e4edbe00 (diff)
downloadkrb5-5758a2caa165c3848a67b63fe73afb5256069af7.zip
krb5-5758a2caa165c3848a67b63fe73afb5256069af7.tar.gz
krb5-5758a2caa165c3848a67b63fe73afb5256069af7.tar.bz2
cleanup
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/authdata@22823 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5/krb/authdata.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/krb5/krb/authdata.c b/src/lib/krb5/krb/authdata.c
index 3762ba7..a2ec6b2 100644
--- a/src/lib/krb5/krb/authdata.c
+++ b/src/lib/krb5/krb/authdata.c
@@ -31,6 +31,8 @@
/* Loosely based on preauth2.c */
+#define IS_PRIMARY_INSTANCE(_module) ((_module)->client_req_init != NULL)
+
static const char *objdirs[] = {
#if TARGET_OS_MAC
KRB5_AUTHDATA_PLUGIN_BUNDLE_DIR,
@@ -165,7 +167,7 @@ k5_ad_size(krb5_context kcontext,
continue;
/* externalize request context for the first instance only */
- if (module->client_req_init == NULL)
+ if (!IS_PRIMARY_INSTANCE(module))
continue;
if (module->ftable->size == NULL)
@@ -222,7 +224,7 @@ k5_ad_externalize(krb5_context kcontext,
continue;
/* externalize request context for the first instance only */
- if (module->client_req_init == NULL)
+ if (!IS_PRIMARY_INSTANCE(module))
continue;
if (module->ftable->externalize == NULL)
@@ -285,7 +287,7 @@ k5_ad_find_module(krb5_context kcontext,
continue;
/* internalize request context for the first instance only */
- if (module->client_req_init == NULL)
+ if (!IS_PRIMARY_INSTANCE(module))
continue;
/* check for name match */
@@ -1011,7 +1013,7 @@ k5_copy_ad_module_data(krb5_context kcontext,
return ENOENT;
/* copy request context for the first instance only */
- if (dst_module->client_req_init == NULL)
+ if (!IS_PRIMARY_INSTANCE(dst_module))
return 0;
assert(strcmp(dst_module->name, src_module->name) == 0);