gss: treat empty cred store as GSS_C_NO_CRED_STORE

In acquire_mech_cred(), treat a credential store with no elements as equivalent
to GSS_C_NO_CRED_STORE, allowing a mechanism's gss_acquire_cred()
implementation to be called.
This commit is contained in:
Luke Howard
2021-08-05 15:46:12 +10:00
parent 3604497fda
commit 510ee92c11

View File

@@ -91,7 +91,8 @@ acquire_mech_cred(OM_uint32 *minor_status,
&mc->gmc_cred,
NULL,
time_rec);
} else if (cred_store == GSS_C_NO_CRED_STORE && m->gm_acquire_cred) {
} else if ((cred_store == GSS_C_NO_CRED_STORE || cred_store->count == 0) &&
m->gm_acquire_cred) {
major_status = m->gm_acquire_cred(minor_status,
mn ? mn->gmn_name : GSS_C_NO_NAME,
time_req,