Browse Source

Trac Ticket #338 - letters in object's cn get converted to
lowercase when renaming object

Fix description: In modrdn, if newrdn is different from the oldrdn
only by upper/lower cases, it was ignored in the entryrdn code.
This patch recognizes the change and updates the entryrdn index.
commit b1ed11117e02c0ae670f05f9850b20fd9334d567

Noriko Hosoi 13 years ago
parent
commit
197a8f5c6a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c

+ 2 - 1
ldap/servers/slapd/back-ldbm/ldbm_entryrdn.c

@@ -542,7 +542,8 @@ entryrdn_rename_subtree(backend *be,
     if (newsrdn && slapi_rdn_get_rdn(newsrdn)) {
         /* if the new RDN value is identical to the old RDN,
          * we don't have to do "rename" */
-        if (strcmp(slapi_rdn_get_nrdn(newsrdn), slapi_rdn_get_nrdn(&oldsrdn))) {
+        /* Don't miss the case changes, too. */
+        if (strcmp(slapi_rdn_get_rdn(newsrdn), slapi_rdn_get_rdn(&oldsrdn))) {
             /* did not match; let's rename it */
             mynewsrdn = newsrdn;
         }