From fbece32d94515bc1ca3889c3d7c0691bbeec3ab0 Mon Sep 17 00:00:00 2001 From: Noriko Hosoi Date: Sep 27 2013 18:45:48 +0000 Subject: 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!) --- diff --git a/ldap/servers/slapd/dn.c b/ldap/servers/slapd/dn.c index dda439b..0f20d16 100644 --- a/ldap/servers/slapd/dn.c +++ b/ldap/servers/slapd/dn.c @@ -2537,7 +2537,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);