diff options
author | Simo Sorce <ssorce@redhat.com> | 2008-05-09 12:52:17 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2008-05-15 13:03:25 -0400 |
commit | 67482e3c688d3692ecb8fac7b9c7630e95452844 (patch) | |
tree | 3eb4c001f49f05f2efb8e5b0c698c7ea68a53a07 | |
parent | 887828ff6cc54c50130374ef5cff3d65fc7af375 (diff) | |
download | freeipa-67482e3c688d3692ecb8fac7b9c7630e95452844.tar.gz freeipa-67482e3c688d3692ecb8fac7b9c7630e95452844.tar.xz freeipa-67482e3c688d3692ecb8fac7b9c7630e95452844.zip |
For some unknown reason the sort control returns values sorted in reverse.
Ask for inverse order to get them straight ...
-rw-r--r-- | ipa-server/ipa-slapi-plugins/dna/dna.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ipa-server/ipa-slapi-plugins/dna/dna.c b/ipa-server/ipa-slapi-plugins/dna/dna.c index 95d06262e..ced18cad8 100644 --- a/ipa-server/ipa-slapi-plugins/dna/dna.c +++ b/ipa-server/ipa-slapi-plugins/dna/dna.c @@ -760,6 +760,8 @@ static int dna_dn_is_config(char *dn) return ret; } +#define DNA_LDAP_TAG_SK_REVERSE 0x81L + static LDAPControl *dna_build_sort_control(const char *attr) { LDAPControl *ctrl; @@ -770,7 +772,7 @@ static LDAPControl *dna_build_sort_control(const char *attr) if (NULL == ber) return NULL; - rc = ber_printf(ber, "{{s}}", attr); + rc = ber_printf(ber, "{{stb}}", attr, DNA_LDAP_TAG_SK_REVERSE, 1); if (-1 == rc) { ber_free(ber, 1); return NULL; |