This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch master
in repository 389-ds-base.
commit 29486e0a691ce7ab6c2bd0b008d62e42112cd3c7
Author: William Brown <firstyear(a)redhat.com>
Date: Mon Apr 24 09:22:44 2017 +1000
Ticket 48310 - entry distribution should be case insensitive
Bug Description: Entry distribution functions were not case
insensitive, but they should have been.
Fix Description: Make the distribution case insensitive.
https://pagure.io/389-ds-base/issue/48310
Author: jmoral (Thanks!)
Review by: wibrown, mreynolds
---
ldap/servers/plugins/distrib/distrib.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/ldap/servers/plugins/distrib/distrib.c
b/ldap/servers/plugins/distrib/distrib.c
index ee60316..fd58e8a 100644
--- a/ldap/servers/plugins/distrib/distrib.c
+++ b/ldap/servers/plugins/distrib/distrib.c
@@ -57,9 +57,7 @@ int alpha_distribution(Slapi_PBlock *pb, Slapi_DN * target_dn,
{
unsigned long op_type;
Slapi_Operation *op;
- char *rdn_type;
- char *rdn_value;
- Slapi_RDN *rdn = NULL;
+ const char *ndn;
char c;
/* first check the operation type
@@ -78,11 +76,8 @@ int alpha_distribution(Slapi_PBlock *pb, Slapi_DN * target_dn,
*/
/* get the first char of first value of rdn */
- rdn = slapi_rdn_new();
- slapi_sdn_get_rdn(target_dn, rdn);
- slapi_rdn_get_first(rdn, &rdn_type, &rdn_value);
- c = rdn_value[0];
- slapi_rdn_free(&rdn);
+ ndn = slapi_sdn_get_ndn(target_dn);
+ c = ndn[0];
if (!(((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) ))
@@ -131,6 +126,8 @@ int hash_distribution(Slapi_PBlock *pb, Slapi_DN * target_dn,
slapi_sdn_get_rdn(target_dn, rdn);
slapi_rdn_get_first(rdn, &rdn_type, &rdn_value);
+ slapi_dn_ignore_case(rdn_value);
+
/* compute the hash value */
hash_value = 0;
while (*rdn_value)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.