diff options
| author | Simo Sorce <simo@redhat.com> | 2012-06-12 14:46:24 -0400 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2012-08-03 15:57:29 -0400 |
| commit | c1ce35f1d35280161ced99f177bf989579a7238e (patch) | |
| tree | be9b2d2e70487484592f159369f30b67602d8d49 /src/lib/gssapi | |
| parent | 0b524beab7e3601bd38d6af8777a16c3c98d807c (diff) | |
| download | krb5-c1ce35f1d35280161ced99f177bf989579a7238e.tar.gz krb5-c1ce35f1d35280161ced99f177bf989579a7238e.tar.xz krb5-c1ce35f1d35280161ced99f177bf989579a7238e.zip | |
Always consider desired_mechs empty in spnego
The only case where the spnego gss_aquire_cred function can be called
with specific OIDs is if the mechglue calls spenego with the spengo
oid, which we never want to loop on anyway. So always consider it as
null, it's the correct behavior with current semantics.
Diffstat (limited to 'src/lib/gssapi')
| -rw-r--r-- | src/lib/gssapi/spnego/spnego_mech.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c index 91cf5713d..4425124b3 100644 --- a/src/lib/gssapi/spnego/spnego_mech.c +++ b/src/lib/gssapi/spnego/spnego_mech.c @@ -374,26 +374,12 @@ spnego_gss_acquire_cred_from(OM_uint32 *minor_status, spcred->neg_mechs = GSS_C_NULL_OID_SET; /* - * If the user did not specify a list of mechs, - * use get_available_mechs to collect a list of + * Always use get_available_mechs to collect a list of * mechs for which creds are available. */ - if (desired_mechs == GSS_C_NULL_OID_SET) { - status = get_available_mechs(minor_status, desired_name, - cred_usage, cred_store, &mcred, - &amechs); - } else { - /* - * The caller gave a specific list of mechanisms, - * so just get whatever creds are available. - * gss_acquire_creds will return the subset of mechs for - * which the given 'output_cred_handle' is valid. - */ - status = gss_acquire_cred_from(minor_status, desired_name, - time_req, desired_mechs, - cred_usage, cred_store, &mcred, - &amechs, time_rec); - } + status = get_available_mechs(minor_status, desired_name, + cred_usage, cred_store, &mcred, + &amechs); if (actual_mechs && amechs != GSS_C_NULL_OID_SET) { (void) gssint_copy_oid_set(&tmpmin, amechs, actual_mechs); |
