#47621 make referential integrity configuration more flexible

Created 3 years ago by lkrispen
Modified 3 months ago

In ticket 47527 scope for applying referential integrity was introduced, but it is not flexible enough. There should be the possibility to define multiple scopes and to exclude subtrees from scope

{{{
plugin_attr_values = slapi_entry_attr_get_charray(plugin_entry, "nsslapd-pluginEntryScope");
...
plugin_EntryScope[j++] = slapi_sdn_new_dn_passin(plugin_attr_values[i]);
}}}
still need to free plugin_attr_values but not the individual plugin_attr_values[i]. same with
{{{
plugin_attr_value = slapi_entry_attr_get_charptr(plugin_entry, "nsslapd-pluginExcludeEntryScope");
}}}
why byref here? passin is used above
{{{
plugin_ExcludeEntryScope = slapi_sdn_new_dn_byref(plugin_attr_value);
}}}

Replying to [comment:3 rmeggins]:

{{{
plugin_attr_values = slapi_entry_attr_get_charray(plugin_entry, "nsslapd-pluginEntryScope");
...
plugin_EntryScope[j++] = slapi_sdn_new_dn_passin(plugin_attr_values[i]);
}}}
still need to free plugin_attr_values but not the individual plugin_attr_values[i].

just missed it

same with

{{{
plugin_attr_value = slapi_entry_attr_get_charptr(plugin_entry, "nsslapd-pluginExcludeEntryScope");
}}}
it is either freed (if not valid dn) or passed in to plugin_ExcludeEntryScope
why byref here? passin is used above
{{{
plugin_ExcludeEntryScope = slapi_sdn_new_dn_byref(plugin_attr_value);
}}}

should be passin

new patch attached, should address teh issues raised in review

$ git merge ticket47621
Updating 1119083. 16dc94f
Fast-forward
ldap/servers/plugins/referint/referint.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 71 insertions(+), 15 deletions(-)
$ git push origin master
Counting objects: 13, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.58 KiB, done.
Total 7 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
1119083. 16dc94f master -> master

git patch file (389-ds-base-1.3.2) -- fixed the conflicts; passed the tests 100%
0001-Ticket-47621-v2-make-referential-integrity-configura.2.patch

Pushed to 389-ds-base-1.3.2:
19660fa. db3de3f 389-ds-base-1.3.2 -> 389-ds-base-1.3.2
commit db3de3f

Closing the ticket on behalf of Ludwig.

3 months ago

Metadata Update from @lkrispen:
- Issue assigned to lkrispen
- Issue set to the milestone: 1.3.2.9

Login to comment on this ticket.

ack

Server - Plugins

1.3.2

Community

enhancement

cancel