summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/plugin_internal_op.c
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2005-02-09 22:09:20 +0000
committerRich Megginson <rmeggins@redhat.com>2005-02-09 22:09:20 +0000
commit73ea0816dabff27277f4b991535e2d9218a1f128 (patch)
treee55015b130c47558db9566aaa5660f6f9feee984 /ldap/servers/slapd/plugin_internal_op.c
parent75b43f1f288542ce3c83b58037e55759b25042d4 (diff)
downloadds-73ea0816dabff27277f4b991535e2d9218a1f128.tar.gz
ds-73ea0816dabff27277f4b991535e2d9218a1f128.tar.xz
ds-73ea0816dabff27277f4b991535e2d9218a1f128.zip
Bug(s) fixed: 147585
Bug Description: The TARGET dn is normalized before the search plugins get the DN. We should provide the original DN. For all other operations we pass in the SLAPI_ORIGINAL_TARGET_DN in the pblock - we can do the same for search as well. This bug was reported by Verisign. Reviewed by: Noriko (Thanks!) Fix Description: Use the pblock param SLAPI_ORIGINAL_TARGET_DN for search operations. Platforms tested: RHEL3 Flag Day: no Doc impact: Yes. Need to document this in the SLAPI doc. QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
Diffstat (limited to 'ldap/servers/slapd/plugin_internal_op.c')
-rw-r--r--ldap/servers/slapd/plugin_internal_op.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ldap/servers/slapd/plugin_internal_op.c b/ldap/servers/slapd/plugin_internal_op.c
index 63a46e1b..c73d0d79 100644
--- a/ldap/servers/slapd/plugin_internal_op.c
+++ b/ldap/servers/slapd/plugin_internal_op.c
@@ -458,6 +458,7 @@ slapi_free_search_results_internal(Slapi_PBlock *pb)
For dn based search:
SLAPI_TARGET_DN set to search base
+ SLAPI_ORIGINAL_TARGET_DN set to original un-normalized search base
SLAPI_SEARCH_SCOPE set to search scope
SLAPI_SEARCH_STRFILTER set to search filter
SLAPI_CONTROLS_ARG set to request controls if present
@@ -717,6 +718,7 @@ static int search_internal_callback_pb (Slapi_PBlock *pb, void *callback_data,
* changed base search strings
*/
slapi_pblock_get(pb, SLAPI_SEARCH_TARGET, &original_base);
+ slapi_pblock_set(pb, SLAPI_ORIGINAL_TARGET_DN, slapi_ch_strdup(original_base));
op_shared_search (pb, 1);
@@ -733,6 +735,10 @@ done:
if(original_base != new_base)
slapi_ch_free((void**)new_base);
+ /* we strdup'd this above - need to free */
+ slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET_DN, &original_base);
+ slapi_ch_free_string(&original_base);
+
return(rc);
}