ldap/servers/slapd/dn.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit a8795a928511321f3b46461680cfbf8314edc982
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Sep 27 11:23:42 2013 -0700
Ticket #47534 - RUV tombstone search with scope "one" doesn`t work
Bug description: slapi_sdn_scope_test_ext examines the given dn
satisfies the scope against the base dn. Onelevel case for the
tombstone DN ignores the nsuniqueid leaf rdn before checking the
scope which should not be done for the RUV tombstone.
Fix description: This patch correctly handles the RUV tombstone
as an exception.
https://fedorahosted.org/389/ticket/47534
Reviewed by rmeggins (Thanks, Rich!)
(cherry picked from commit fbece32d94515bc1ca3889c3d7c0691bbeec3ab0)
diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c
index 9ed8091..9530b84 100644
--- a/ldap/servers/slapd/dn.c
+++ b/ldap/servers/slapd/dn.c
@@ -2645,7 +2645,10 @@ slapi_sdn_scope_test_ext( const Slapi_DN *dn, const Slapi_DN *base,
int scope, i
}
break;
case LDAP_SCOPE_ONELEVEL:
- if (flags & SLAPI_ENTRY_FLAG_TOMBSTONE) {
+#define RUVRDN SLAPI_ATTR_UNIQUEID "=" RUV_STORAGE_ENTRY_UNIQUEID
","
+ if ((flags & SLAPI_ENTRY_FLAG_TOMBSTONE) &&
+ (strncmp(slapi_sdn_get_ndn(dn), RUVRDN, sizeof(RUVRDN) - 1))) {
+ /* tombstones except RUV tombstone */
Slapi_DN parent;
slapi_sdn_init(&parent);
slapi_sdn_get_parent(dn, &parent);