Make sure GSS-API mechanisms are loaded if gss_acquire_cred is called

with a null mechanism list.

PR:		misc/117349
Submitted by:	Sean McNeil <sean at mcneil dot com>
This commit is contained in:
dfr 2007-11-28 08:50:20 +00:00
parent 2a850cfe1a
commit e4ca7e7301

View File

@ -59,8 +59,8 @@ gss_acquire_cred(OM_uint32 *minor_status,
* First make sure that at least one of the requested
* mechanisms is one that we support.
*/
_gss_load_mech();
if (mechs) {
_gss_load_mech();
for (i = 0; i < mechs->count; i++) {
int t;
gss_test_oid_set_member(minor_status,
@ -73,6 +73,8 @@ gss_acquire_cred(OM_uint32 *minor_status,
*minor_status = 0;
return (GSS_S_BAD_MECH);
}
} else {
mechs = _gss_mech_oids;
}
if (actual_mechs) {
@ -92,9 +94,6 @@ gss_acquire_cred(OM_uint32 *minor_status,
cred->gc_usage = cred_usage;
SLIST_INIT(&cred->gc_mc);
if (mechs == GSS_C_NO_OID_SET)
mechs = _gss_mech_oids;
set.count = 1;
min_time = GSS_C_INDEFINITE;
for (i = 0; i < mechs->count; i++) {