diff options
author | Luke Howard <lukeh@padl.com> | 2011-03-17 05:52:17 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2011-03-17 05:52:17 +0000 |
commit | b25dba1ae12f75bb5dc526b4ba39c3932c2e375f (patch) | |
tree | 4ff4bd598c34274e6f152aadb1366f5633ee5c33 /src/lib/gssapi | |
parent | b74b7b673a69d9a10c0f99190638efc3bd72479a (diff) | |
download | krb5-b25dba1ae12f75bb5dc526b4ba39c3932c2e375f.zip krb5-b25dba1ae12f75bb5dc526b4ba39c3932c2e375f.tar.gz krb5-b25dba1ae12f75bb5dc526b4ba39c3932c2e375f.tar.bz2 |
avoid unnecessary call to gssint_get_mechanism() in case of error path
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/moonshot-mechglue-fixes@24715 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r-- | src/lib/gssapi/mechglue/g_userok.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/gssapi/mechglue/g_userok.c b/src/lib/gssapi/mechglue/g_userok.c index 9447f2a..1fbca2d 100644 --- a/src/lib/gssapi/mechglue/g_userok.c +++ b/src/lib/gssapi/mechglue/g_userok.c @@ -90,16 +90,16 @@ gss_userok(OM_uint32 *minor, intName = (gss_union_name_t)name; - mech = gssint_get_mechanism(intName->mech_type); - if (mech == NULL) - return (GSS_S_UNAVAILABLE); - /* may need to import the name if this is not MN */ - if (intName->mech_type == NULL) { + if (intName->mech_type == GSS_C_NO_OID) return (GSS_S_FAILURE); - } else + else mechName = intName->mech_name; + mech = gssint_get_mechanism(intName->mech_type); + if (mech == NULL) + return (GSS_S_UNAVAILABLE); + if (mech->gss_userok) { major = mech->gss_userok(minor, mechName, user, user_ok); |