summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-slapi-plugins
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2008-05-09 12:52:17 -0400
committerSimo Sorce <ssorce@redhat.com>2008-05-15 12:59:28 -0400
commitfb3555c483bf3f6af71355965e9e07c149e2e5d1 (patch)
tree7235aed7cd8aed70883942303b16836cb633a7c1 /ipa-server/ipa-slapi-plugins
parent10f0881dba00e181ef9f01799fd9d7337b26c60a (diff)
downloadfreeipa-fb3555c483bf3f6af71355965e9e07c149e2e5d1.tar.gz
freeipa-fb3555c483bf3f6af71355965e9e07c149e2e5d1.tar.xz
freeipa-fb3555c483bf3f6af71355965e9e07c149e2e5d1.zip
For some unknown reason the sort control returns values sorted in reverse.
Ask for inverse order to get them straight ...
Diffstat (limited to 'ipa-server/ipa-slapi-plugins')
-rw-r--r--ipa-server/ipa-slapi-plugins/dna/dna.c4
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;