diff options
author | Nathan Kinder <nkinder@redhat.com> | 2009-12-15 14:16:04 -0800 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2009-12-15 14:16:04 -0800 |
commit | cf0fcc51746c7e280ada377d37cdab318fd231e9 (patch) | |
tree | 9e126ecec5e170b6bc1a8ed94f5fa803bc889c1e /ldap/servers/plugins/retrocl | |
parent | 24e6ca2262e1fa9114fb80b5d2f32205379d3a97 (diff) | |
download | ds-cf0fcc51746c7e280ada377d37cdab318fd231e9.tar.gz ds-cf0fcc51746c7e280ada377d37cdab318fd231e9.tar.xz ds-cf0fcc51746c7e280ada377d37cdab318fd231e9.zip |
Bug 518084 - Fix out of order retro changelog entries
When using the retro changelog plugin, post-op plugins that perform
internal operations (such as memberOf) can result in the internal
operation preceeding the original operation in the changelog.
The fix is to give the retro changelog a higher precedence than the
other post-op plugins. This required some core server changes to
be made around the plugin precedence to allow an object plugin to
pass it's precedence into it's calls to slapi_register_plugin()
when it registers other plugin types.
I added an update LDIF to set the plugin precedence when running
"setup-ds.pl -u". I also noticed an AVC when restarting after the
update due to the schema.bak directory that is created. I've
adjusted the dirsrv SELinux policy to deal with this AVC.
Diffstat (limited to 'ldap/servers/plugins/retrocl')
-rw-r--r-- | ldap/servers/plugins/retrocl/retrocl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ldap/servers/plugins/retrocl/retrocl.c b/ldap/servers/plugins/retrocl/retrocl.c index f598e3d9..4e9ca844 100644 --- a/ldap/servers/plugins/retrocl/retrocl.c +++ b/ldap/servers/plugins/retrocl/retrocl.c @@ -375,20 +375,23 @@ retrocl_plugin_init(Slapi_PBlock *pb) { static int legacy_initialised= 0; int rc = 0; + int precedence = 0; void *identity = NULL; slapi_pblock_get (pb, SLAPI_PLUGIN_IDENTITY, &identity); PR_ASSERT (identity); g_plg_identity[PLUGIN_RETROCL] = identity; + + slapi_pblock_get( pb, SLAPI_PLUGIN_PRECEDENCE, &precedence ); if (!legacy_initialised) { rc= slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_01 ); rc= slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&retrocldesc ); rc= slapi_pblock_set( pb, SLAPI_PLUGIN_START_FN, (void *) retrocl_start ); rc= slapi_pblock_set( pb, SLAPI_PLUGIN_CLOSE_FN, (void *) retrocl_stop ); - - rc= slapi_register_plugin("postoperation", 1 /* Enabled */, "retrocl_postop_init", retrocl_postop_init, "Retrocl postoperation plugin", NULL, identity); - rc= slapi_register_plugin("internalpostoperation", 1 /* Enabled */, "retrocl_internalpostop_init", retrocl_internalpostop_init, "Retrocl internal postoperation plugin", NULL, identity); + + rc= slapi_register_plugin_ext("postoperation", 1 /* Enabled */, "retrocl_postop_init", retrocl_postop_init, "Retrocl postoperation plugin", NULL, identity, precedence); + rc= slapi_register_plugin_ext("internalpostoperation", 1 /* Enabled */, "retrocl_internalpostop_init", retrocl_internalpostop_init, "Retrocl internal postoperation plugin", NULL, identity, precedence); } legacy_initialised = 1; |