summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-10-01 14:11:20 -0700
committerNathan Kinder <nkinder@redhat.com>2010-10-01 14:11:20 -0700
commita82f61269d69882d19b15def70de68906ed5740e (patch)
tree28ca20f12c2c6196c928aa3c8e5d9b4a014303fe
parenta7de5f2a4323d224c63f722172eee8b63752fb45 (diff)
downloadds-a82f61269d69882d19b15def70de68906ed5740e.tar.gz
ds-a82f61269d69882d19b15def70de68906ed5740e.tar.xz
ds-a82f61269d69882d19b15def70de68906ed5740e.zip
Bug 522055 - Scope check for managed attribute fails
When using the linked attribute plug-in, an entry that is renamed that is outside of the scope of the plug-in will cause the forward links in other entries to be updated if they contain a managed attribute type. We need to check if the new DN of the renamed entry is within the scope of the configured linked attributes before updating forward links.
-rw-r--r--ldap/servers/plugins/linkedattrs/linked_attrs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldap/servers/plugins/linkedattrs/linked_attrs.c b/ldap/servers/plugins/linkedattrs/linked_attrs.c
index 61099423..5cfef5d3 100644
--- a/ldap/servers/plugins/linkedattrs/linked_attrs.c
+++ b/ldap/servers/plugins/linkedattrs/linked_attrs.c
@@ -1934,7 +1934,8 @@ linked_attrs_modrdn_post_op(Slapi_PBlock *pb)
linked_attrs_find_config_reverse(slapi_value_get_string(val),
type, &config);
- if (config) {
+ /* If the new DN is within scope, we should fixup the forward links. */
+ if (config && slapi_dn_issuffix(new_dn, (config->scope))) {
Slapi_ValueSet *vals = slapi_valueset_new();
slapi_valueset_add_value(vals, val);