From 11211d0dae45606f6a2f58aa4b5713994dd357ab Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 18 Aug 2005 11:26:29 +0000 Subject: [PATCH] strip entryDN from search entries; frontend will reattach it :( --- servers/slapd/back-ldap/search.c | 8 +++++++- servers/slapd/back-meta/search.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index ff9425bb57..e06cb8bb42 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -545,7 +545,9 @@ ldap_build_entry( } /* no subschemaSubentry */ - if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry ) { + if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry + || attr->a_desc == slap_schema.si_ad_entryDN ) + { /* * We eat target's subschemaSubentry because @@ -553,6 +555,10 @@ ldap_build_entry( * to resolve to the appropriate backend; * later, the local subschemaSubentry is * added. + * + * We also eat entryDN because the frontend + * will reattach it without checking if already + * present... */ ( void )ber_scanf( &ber, "x" /* [W] */ ); diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index 8437cea8e8..570d9deb5f 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -924,7 +924,9 @@ meta_send_entry( } /* no subschemaSubentry */ - if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry ) { + if ( attr->a_desc == slap_schema.si_ad_subschemaSubentry + || attr->a_desc == slap_schema.si_ad_entryDN ) + { /* * We eat target's subschemaSubentry because @@ -932,6 +934,10 @@ meta_send_entry( * to resolve to the appropriate backend; * later, the local subschemaSubentry is * added. + * + * We also eat entryDN because the frontend + * will reattach it without checking if already + * present... */ ( void )ber_scanf( &ber, "x" /* [W] */ ); -- 2.39.5