mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 09:02:44 +00:00
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:
parent
3249f70d0f
commit
bfd85d3fbe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174013
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user