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:
@@ -132,14 +132,14 @@ gss_duplicate_cred(OM_uint32 *minor_status,
|
||||
*minor_status = 0;
|
||||
major_status = GSS_S_NO_CRED;
|
||||
|
||||
HEIM_SLIST_FOREACH(mc, &cred->gc_mc, gmc_link) {
|
||||
HEIM_TAILQ_FOREACH(mc, &cred->gc_mc, gmc_link) {
|
||||
struct _gss_mechanism_cred *copy_mc;
|
||||
|
||||
major_status = copy_cred_element(minor_status, mc, ©_mc);
|
||||
if (major_status != GSS_S_COMPLETE)
|
||||
break;
|
||||
|
||||
HEIM_SLIST_INSERT_HEAD(&new_cred->gc_mc, copy_mc, gmc_link);
|
||||
HEIM_TAILQ_INSERT_TAIL(&new_cred->gc_mc, copy_mc, gmc_link);
|
||||
}
|
||||
|
||||
if (major_status != GSS_S_COMPLETE) {
|
||||
|
Reference in New Issue
Block a user