From 78b318709a6ae76188c85a819ab80b9de1ccac36 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 2 Feb 2012 09:38:49 -0700 Subject: [PATCH] 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: ??? 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 --- ldap/servers/slapd/mapping_tree.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ldap/servers/slapd/mapping_tree.c b/ldap/servers/slapd/mapping_tree.c index b2db9fe..c14c5db 100644 --- a/ldap/servers/slapd/mapping_tree.c +++ b/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: " -- 1.7.1