Skip to content

Commit

Permalink
Accept GSS mechs which don't supply attributes
Browse files Browse the repository at this point in the history
If gss_inquire_attrs_for_mech() is called for a mechanism which does
not implement it, the call will succeed with mech_attrs set to
GSS_C_NO_OID_SET (as is explicitly allowed by RFC 5587).
generic_gss_test_oid_set_member() returns an error on this value,
causing gss_accept_sec_context() to erroneously deny the mechanism
when no verifier credential handle is supplied.  Change
allow_mech_by_default() to explicitly check for no mech attribute set.

(cherry picked from commit bd321c9)

ticket: 8840
version_fixed: 1.17.1
  • Loading branch information
greghudson committed Dec 9, 2019
1 parent 4ec5724 commit 563ad3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/gssapi/mechglue/g_accept_sec_context.c
Expand Up @@ -104,6 +104,10 @@ allow_mech_by_default(gss_OID mech)
if (status)
return 0;

/* If the mechanism doesn't support RFC 5587, don't exclude it. */
if (attrs == GSS_C_NO_OID_SET)
return 1;

/* Check for each attribute which would cause us to exclude this mech from
* the default credential. */
if (generic_gss_test_oid_set_member(&minor, GSS_C_MA_DEPRECATED,
Expand Down

0 comments on commit 563ad3a

Please sign in to comment.