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

@@ -28,12 +28,12 @@
*/
struct _gss_mechanism_name {
HEIM_SLIST_ENTRY(_gss_mechanism_name) gmn_link;
HEIM_TAILQ_ENTRY(_gss_mechanism_name) gmn_link;
gssapi_mech_interface gmn_mech; /* mechanism ops for MN */
gss_OID gmn_mech_oid; /* mechanism oid for MN */
gss_name_t gmn_name; /* underlying MN */
};
HEIM_SLIST_HEAD(_gss_mechanism_name_list, _gss_mechanism_name);
HEIM_TAILQ_HEAD(_gss_mechanism_name_list, _gss_mechanism_name);
struct _gss_name {
gss_OID gn_type; /* type of name */