Pick last match in LDAP sudoers too

This commit is contained in:
Todd C. Miller
2010-12-20 16:37:44 -05:00
parent 4294e4db8b
commit 93e9635842
2 changed files with 6 additions and 5 deletions

View File

@@ -2112,7 +2112,7 @@ done:
}
/*
* Sort comparison function for ldap_entry_wrapper structures.
* Comparison function for ldap_entry_wrapper structures, descending order.
*/
static int
ldap_entry_compare(const void *a, const void *b)
@@ -2120,8 +2120,8 @@ ldap_entry_compare(const void *a, const void *b)
const struct ldap_entry_wrapper *aw = a;
const struct ldap_entry_wrapper *bw = b;
return(aw->order < bw->order ? -1 :
(aw->order > bw->order ? 1 : 0));
return(bw->order < aw->order ? -1 :
(bw->order > aw->order ? 1 : 0));
}
/*