diff options
author | Luke Howard <lukeh@padl.com> | 2011-04-01 00:26:22 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-04-01 00:26:22 +0000 |
commit | c450ca687fbdabb1d328ca388f1918c8230be54f (patch) | |
tree | 1894a64c8094275cb76831e307b1cde98d58b0e4 /src/lib/gssapi | |
parent | 808291226b50b7572fb289603dd735eb27898e81 (diff) | |
download | krb5-c450ca687fbdabb1d328ca388f1918c8230be54f.zip krb5-c450ca687fbdabb1d328ca388f1918c8230be54f.tar.gz krb5-c450ca687fbdabb1d328ca388f1918c8230be54f.tar.bz2 |
verify desired and actual mech OIDs are equal before trying gss_duplicate_name
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/moonshot-mechglue-fixes@24762 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r-- | src/lib/gssapi/mechglue/g_glue.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/gssapi/mechglue/g_glue.c b/src/lib/gssapi/mechglue/g_glue.c index f0a5796..092147b 100644 --- a/src/lib/gssapi/mechglue/g_glue.c +++ b/src/lib/gssapi/mechglue/g_glue.c @@ -302,8 +302,13 @@ gss_name_t *internal_name; if (mech == NULL) return (GSS_S_BAD_MECH); - if (mech->gss_duplicate_name != NULL && - union_name->mech_name != GSS_C_NO_NAME) { + /* + * If we are importing a name for the same mechanism, and the + * mechanism implements gss_duplicate_name, then use that. + */ + if (union_name->mech_name != GSS_C_NO_NAME && + g_OID_equal(union_name->mech_type, mech_type) && + mech->gss_duplicate_name != NULL) { status = mech->gss_duplicate_name(minor_status, union_name->mech_name, internal_name); |