Browse Source

Ticket #277 - cannot set repl referrals or state

https://fedorahosted.org/389/ticket/277
Resolves: Ticket #277
Bug Description: cannot set repl referrals or state
Reviewed by: nkinder (Thanks!)
Branch: master
Fix Description: Need to create a normalized DN string using
slapi_create_dn_string rather than a raw unnormalized DN string with
slapi_ch_smprintf.  The code was using the unnorm string to perform
the internal search and modify operations, and the modify code was
expecting a normalized DN string instead.  The search code was normalizing
the DN, but the comment in the function suggested that it was supposed
to return a normalized DN string.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 14 years ago
parent
commit
bbb41398a5
1 changed files with 4 additions and 4 deletions
  1. 4 4
      ldap/servers/slapd/mapping_tree.c

+ 4 - 4
ldap/servers/slapd/mapping_tree.c

@@ -2909,8 +2909,8 @@ slapi_get_mapping_tree_node_configdn (const Slapi_DN *root)
         return NULL;
 
     /* This function converts the old DN style to the new one. */
-    dn = slapi_ch_smprintf("cn=\"%s\",%s", 
-                           slapi_sdn_get_ndn(root), MAPPING_TREE_BASE_DN);
+    dn = slapi_create_dn_string("cn=\"%s\",%s", 
+                                slapi_sdn_get_ndn(root), MAPPING_TREE_BASE_DN);
     if (NULL == dn) {
         LDAPDebug1Arg(LDAP_DEBUG_ANY,
                       "slapi_get_mapping_tree_node_configdn: "
@@ -2936,8 +2936,8 @@ slapi_get_mapping_tree_node_configsdn (const Slapi_DN *root)
         return NULL;
 
     /* This function converts the old DN style to the new one. */
-    dn = slapi_ch_smprintf("cn=\"%s\",%s", 
-                           slapi_sdn_get_dn(root), MAPPING_TREE_BASE_DN);
+    dn = slapi_create_dn_string("cn=\"%s\",%s", 
+                                slapi_sdn_get_dn(root), MAPPING_TREE_BASE_DN);
     if (NULL == dn) {
         LDAPDebug1Arg(LDAP_DEBUG_ANY,
                       "slapi_get_mapping_tree_node_configsdn: "