Skip to content

Commit

Permalink
Always consider desired_mechs empty in spnego (2)
Browse files Browse the repository at this point in the history
Follow previous change to add_cred_from.
The only case where the spnego gss_*_cred_* functions can be called
with specific OIDs is if the mechglue calls spnego 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.
  • Loading branch information
simo5 authored and greghudson committed Aug 6, 2012
1 parent 09f85df commit bb02471
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/lib/gssapi/spnego/spnego_mech.c
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ spnego_gss_acquire_cred_with_password(OM_uint32 *minor_status,
OM_uint32 *time_rec)
{
OM_uint32 status, tmpmin;
gss_OID_set amechs = GSS_C_NULL_OID_SET, dmechs;
gss_OID_set amechs = GSS_C_NULL_OID_SET;
gss_cred_id_t mcred = NULL;
spnego_gss_cred_id_t spcred = NULL;

Expand All @@ -2543,16 +2543,14 @@ spnego_gss_acquire_cred_with_password(OM_uint32 *minor_status,
if (time_rec)
*time_rec = 0;

dmechs = desired_mechs;
if (desired_mechs == GSS_C_NULL_OID_SET) {
status = get_available_mechs(minor_status, desired_name,
cred_usage, GSS_C_NO_CRED_STORE,
NULL, &amechs);
dmechs = amechs;
}
status = get_available_mechs(minor_status, desired_name,
cred_usage, GSS_C_NO_CRED_STORE,
NULL, &amechs);
if (status != GSS_S_COMPLETE)
goto cleanup;

status = gss_acquire_cred_with_password(minor_status, desired_name,
password, time_req, dmechs,
password, time_req, amechs,
cred_usage, &mcred,
actual_mechs, time_rec);
if (status != GSS_S_COMPLETE)
Expand Down

0 comments on commit bb02471

Please sign in to comment.