gss: add some missing GM_USE_MG_CRED checks

GM_USE_MG_CRED allows a mechanism glue credential to be used by a mechanism
without additional wrapping. Although no extant mechanisms use this flag, the
flag had sporadic support in the mechanism glue already. In the interest of
consistency, add missing GM_USE_MG_CRED checks. If this functionality is not
desired, then all checks should be removed.
This commit is contained in:
Luke Howard
2019-12-28 16:35:04 +11:00
parent 340cc3f092
commit e80248ed36
4 changed files with 17 additions and 5 deletions

View File

@@ -200,7 +200,7 @@ gss_acquire_cred_from(OM_uint32 *minor_status,
OM_uint32 cred_time;
m = __gss_get_mechanism(&mechs->elements[i]);
if (m == NULL)
if (m == NULL || (m->gm_flags & GM_USE_MG_CRED) != 0)
continue;
if (desired_name != GSS_C_NO_NAME) {