瀏覽代碼

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 年之前
父節點
當前提交
197a8f5c6a
共有 1 個文件被更改,包括 2 次插入1 次删除
  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;
         }