gss: use tail queue instead of singly linked list in mechglue

The GSS mechglue uses singly linked lists for mechanisms and mechanism objects,
to which new entries are inserted at the head. This breaks ordering of
mechanisms specified in OID sets and in /etc/gss/mech, as they will be back to
front. Use a tail queue instead so that new entries are inserted at the end.
This commit is contained in:
Luke Howard
2019-12-28 16:30:55 +11:00
parent d7138cfbe7
commit 31af9ba703
42 changed files with 199 additions and 216 deletions

View File

@@ -30,13 +30,13 @@
#include <gssapi_mech.h>
struct _gss_mech_switch {
HEIM_SLIST_ENTRY(_gss_mech_switch) gm_link;
HEIM_TAILQ_ENTRY(_gss_mech_switch) gm_link;
gss_OID gm_mech_oid;
gss_OID_set gm_name_types;
void *gm_so;
gssapi_mech_interface_desc gm_mech;
};
HEIM_SLIST_HEAD(_gss_mech_switch_list, _gss_mech_switch);
HEIM_TAILQ_HEAD(_gss_mech_switch_list, _gss_mech_switch);
extern struct _gss_mech_switch_list _gss_mechs;
extern gss_OID_set _gss_mech_oids;