Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315142 Details for
Bug 457846
The Windows Sync API should have plug-in points
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs
cvsdiffs (text/plain), 22.71 KB, created by
Rich Megginson
on 2008-08-27 20:54:56 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2008-08-27 20:54:56 UTC
Size:
22.71 KB
patch
obsolete
>Index: ldapserver/ldap/servers/plugins/replication/windows_connection.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_connection.c,v >retrieving revision 1.19 >diff -u -8 -r1.19 windows_connection.c >--- ldapserver/ldap/servers/plugins/replication/windows_connection.c 5 Aug 2008 20:26:21 -0000 1.19 >+++ ldapserver/ldap/servers/plugins/replication/windows_connection.c 27 Aug 2008 20:53:34 -0000 >@@ -1460,22 +1460,22 @@ > ConnResult > windows_conn_replica_supports_dirsync(Repl_Connection *conn) > { > ConnResult return_value; > int ldap_rc; > > LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_conn_replica_supports_dirsync\n", 0, 0, 0 ); > >-#ifdef WINSYNC_TEST >- /* used to fake out dirsync to think it's talking to a real ad when in fact >- it's just talking to another directory server */ >- conn->supports_dirsync = 1; >- return CONN_SUPPORTS_DIRSYNC; >-#endif >+ if (getenv("WINSYNC_USE_DS")) { >+ /* used to fake out dirsync to think it's talking to a real ad when in fact >+ it's just talking to another directory server */ >+ conn->supports_dirsync = 1; >+ return CONN_SUPPORTS_DIRSYNC; >+ } > > if (windows_conn_connected(conn)) > { > if (conn->supports_dirsync == -1) { > LDAPMessage *res = NULL; > LDAPMessage *entry = NULL; > char *attrs[] = {"supportedcontrol", NULL}; > >Index: ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c,v >retrieving revision 1.16 >diff -u -8 -r1.16 windows_inc_protocol.c >--- ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c 24 Jun 2008 22:22:09 -0000 1.16 >+++ ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c 27 Aug 2008 20:53:34 -0000 >@@ -807,16 +807,22 @@ > { > slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, > "%s: Incremental protocol: fatal internal error updating the CSN generator!\n", > agmt_get_long_name(prp->agmt)); > next_state = STATE_STOP_FATAL_ERROR; > } > else > { >+ /* call begin incremental update callback */ >+ winsync_plugin_call_begin_update_cb(prp->agmt, >+ windows_private_get_directory_subtree(prp->agmt), >+ windows_private_get_windows_subtree(prp->agmt), >+ 0 /* is_total == FALSE */); >+ > rc = send_updates(prp, ruv, &num_changes_sent); > if (rc == UPDATE_NO_MORE_UPDATES) > { > dev_debug("windows_inc_run(STATE_SENDING_UPDATES) -> send_updates = UPDATE_NO_MORE_UPDATES -> STATE_WAIT_CHANGES"); > agmt_set_last_update_status(prp->agmt, 0, 0, "Incremental update succeeded"); > next_state = STATE_WAIT_CHANGES; > } > else if (rc == UPDATE_YIELD) >@@ -869,16 +875,22 @@ > > agmt_set_last_update_end(prp->agmt, current_time()); > agmt_set_update_in_progress(prp->agmt, PR_FALSE); > /* If timed out, close the connection after released the replica */ > windows_release_replica(prp); > if (rc == UPDATE_TIMEOUT) { > windows_conn_disconnect(prp->conn); > } >+ /* call end incremental update callback */ >+ winsync_plugin_call_end_update_cb(prp->agmt, >+ windows_private_get_directory_subtree(prp->agmt), >+ windows_private_get_windows_subtree(prp->agmt), >+ 0 /* is_total == FALSE */); >+ > if (rc == UPDATE_NO_MORE_UPDATES && num_changes_sent > 0) > { > if (pausetime > 0) > { > /* richm - 20020219 - If we have acquired the consumer, and another master has gone > into backoff waiting for us to release it, we may acquire the replica sooner > than the other master has a chance to, and the other master may not be able > to acquire the consumer for a long time (hours, days?) if this server is >Index: ldapserver/ldap/servers/plugins/replication/windows_private.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_private.c,v >retrieving revision 1.19 >diff -u -8 -r1.19 windows_private.c >--- ldapserver/ldap/servers/plugins/replication/windows_private.c 5 Aug 2008 22:43:29 -0000 1.19 >+++ ldapserver/ldap/servers/plugins/replication/windows_private.c 27 Aug 2008 20:53:34 -0000 >@@ -42,18 +42,18 @@ > > > /* windows_private.c */ > > #include "repl.h" > #include "repl5.h" > #include "slap.h" > #include "slapi-plugin.h" >-#include "windowsrepl.h" > #include "winsync-plugin.h" >+#include "windowsrepl.h" > > struct windowsprivate { > > Slapi_DN *windows_subtree; /* DN of synchronized subtree (on the windows side) */ > Slapi_DN *directory_subtree; /* DN of synchronized subtree on directory side */ > /* this simplifies the mapping as it's simply > from the former to the latter container, or > vice versa */ >@@ -212,16 +212,21 @@ > void windows_agreement_delete(Repl_Agmt *ra) > { > > Dirsync_Private *dp = (Dirsync_Private *) agmt_get_priv(ra); > LDAPDebug( LDAP_DEBUG_TRACE, "=> windows_private_delete\n", 0, 0, 0 ); > > PR_ASSERT(dp != NULL); > >+ winsync_plugin_call_destroy_agmt_cb(ra, dp->directory_subtree, >+ dp->windows_subtree); >+ >+ slapi_sdn_free(&dp->directory_subtree); >+ slapi_sdn_free(&dp->windows_subtree); > slapi_filter_free(dp->directory_filter, 1); > slapi_filter_free(dp->deleted_filter, 1); > slapi_entry_free(dp->raw_entry); > dp->raw_entry = NULL; > dp->api_cookie = NULL; > slapi_ch_free((void **)dp); > > LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_delete\n", 0, 0, 0 ); >@@ -533,19 +538,20 @@ > PR_ASSERT(ra); > > dp = (Dirsync_Private *) agmt_get_priv(ra); > PR_ASSERT (dp); > ber = ber_alloc(); > > ber_printf( ber, "{iio}", dp->dirsync_flags, dp->dirsync_maxattributecount, dp->dirsync_cookie, dp->dirsync_cookie_len ); > >-#ifdef WINSYNC_TEST >- iscritical = PR_FALSE; >-#endif >+ /* Use a regular directory server instead of a real AD - for testing */ >+ if (getenv("WINSYNC_USE_DS")) { >+ iscritical = PR_FALSE; >+ } > slapi_build_control( REPL_DIRSYNC_CONTROL_OID, ber, iscritical, &control); > > ber_free(ber,1); > > LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_private_dirsync_control\n", 0, 0, 0 ); > > > return control; >@@ -558,17 +564,17 @@ > > */ > void windows_private_update_dirsync_control(const Repl_Agmt *ra,LDAPControl **controls ) > { > > Dirsync_Private *dp; > int foundDirsyncControl; > int i; >- LDAPControl *dirsync; >+ LDAPControl *dirsync = NULL; > BerElement *ber; > ber_int_t hasMoreData; > ber_int_t maxAttributeCount; > BerValue *serverCookie; > #ifdef FOR_DEBUGGING > int return_value = LDAP_SUCCESS; > #endif > >@@ -615,16 +621,17 @@ > dp->dirsync_cookie_len = (int) serverCookie->bv_len; /* XXX shouldn't cast? */ > > /* dp->dirsync_maxattributecount = maxAttributeCount; We don't need to keep this */ > dp->dirsync_cookie_has_more = hasMoreData; > > choke: > ber_bvfree(serverCookie); > ber_free(ber,1); >+ ldap_control_free(dirsync); > } > else > { > #ifdef FOR_DEBUGGING > return_value = LDAP_CONTROL_NOT_FOUND; > #endif > } > >@@ -1182,8 +1189,69 @@ > NULL; > > if (!thefunc) { > return 1; /* default is entry can be added to AD */ > } > > return (*thefunc)(windows_private_get_api_cookie(ra), local_entry, remote_dn); > } >+ >+void >+winsync_plugin_call_begin_update_cb(const Repl_Agmt *ra, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree, int is_total) >+{ >+ winsync_plugin_update_cb thefunc = >+ (_WinSyncAPI && _WinSyncAPI[WINSYNC_PLUGIN_BEGIN_UPDATE_CB]) ? >+ (winsync_plugin_update_cb)_WinSyncAPI[WINSYNC_PLUGIN_BEGIN_UPDATE_CB] : >+ NULL; >+ >+ if (!thefunc) { >+ return; >+ } >+ >+ (*thefunc)(windows_private_get_api_cookie(ra), ds_subtree, ad_subtree, is_total); >+ >+ return; >+} >+ >+void >+winsync_plugin_call_end_update_cb(const Repl_Agmt *ra, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree, int is_total) >+{ >+ winsync_plugin_update_cb thefunc = >+ (_WinSyncAPI && _WinSyncAPI[WINSYNC_PLUGIN_END_UPDATE_CB]) ? >+ (winsync_plugin_update_cb)_WinSyncAPI[WINSYNC_PLUGIN_END_UPDATE_CB] : >+ NULL; >+ >+ if (!thefunc) { >+ return; >+ } >+ >+ (*thefunc)(windows_private_get_api_cookie(ra), ds_subtree, ad_subtree, is_total); >+ >+ return; >+} >+ >+void >+winsync_plugin_call_destroy_agmt_cb(const Repl_Agmt *ra, >+ const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree) >+{ >+ winsync_plugin_destroy_agmt_cb thefunc = >+ (_WinSyncAPI && _WinSyncAPI[WINSYNC_PLUGIN_DESTROY_AGMT_CB]) ? >+ (winsync_plugin_destroy_agmt_cb)_WinSyncAPI[WINSYNC_PLUGIN_DESTROY_AGMT_CB] : >+ NULL; >+ >+ if (thefunc) { >+ (*thefunc)(windows_private_get_api_cookie(ra), ds_subtree, ad_subtree); >+ } >+ >+ return; >+} >+ >+/* #define WINSYNC_TEST_IPA */ >+#ifdef WINSYNC_TEST_IPA >+ >+#include "ipa-winsync.c" >+#include "ipa-winsync-config.c" >+ >+#endif >Index: ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c,v >retrieving revision 1.39 >diff -u -8 -r1.39 windows_protocol_util.c >--- ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c 5 Aug 2008 20:26:22 -0000 1.39 >+++ ldapserver/ldap/servers/plugins/replication/windows_protocol_util.c 27 Aug 2008 20:53:35 -0000 >@@ -2600,16 +2600,17 @@ > { > slapi_entry_free(remote_entry); > } > } > if (new_dn) > { > *dn = new_dn; > } >+ slapi_ch_free_string(&guid); > return retval; > } > > /* Given a tombstone entry, return the DN of its peer in this server (if present) */ > static int > map_tombstone_dn_inbound(Slapi_Entry *e, Slapi_DN **dn, const Repl_Agmt *ra) > { > int retval = 0; >Index: ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c,v >retrieving revision 1.13 >diff -u -8 -r1.13 windows_tot_protocol.c >--- ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c 5 Aug 2008 20:26:22 -0000 1.13 >+++ ldapserver/ldap/servers/plugins/replication/windows_tot_protocol.c 27 Aug 2008 20:53:35 -0000 >@@ -148,16 +148,22 @@ > > agmt_set_last_init_status(prp->agmt, 0, 0, "Total update in progress"); > > slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, "Beginning total update of replica " > "\"%s\".\n", agmt_get_long_name(prp->agmt)); > > windows_private_null_dirsync_cookie(prp->agmt); > >+ /* call begin total update callback */ >+ winsync_plugin_call_begin_update_cb(prp->agmt, >+ windows_private_get_directory_subtree(prp->agmt), >+ windows_private_get_windows_subtree(prp->agmt), >+ 1 /* is_total == TRUE */); >+ > /* get everything */ > windows_dirsync_inc_run(prp); > > windows_private_save_dirsync_cookie(prp->agmt); > > /* If we got a change from dirsync, we should have a good RUV > * that has a min & max value. If no change was generated, > * the RUV will have NULL min and max csns. We deal with >@@ -220,16 +226,22 @@ > if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) > { > slapi_log_error(SLAPI_LOG_REPL, NULL, "total update setting consumer RUV:\n"); > ruv_dump (starting_ruv, "consumer", NULL); > } > agmt_set_consumer_ruv(prp->agmt, starting_ruv ); > } > >+ /* call end total update callback */ >+ winsync_plugin_call_end_update_cb(prp->agmt, >+ windows_private_get_directory_subtree(prp->agmt), >+ windows_private_get_windows_subtree(prp->agmt), >+ 1 /* is_total == TRUE */); >+ > done: > if (starting_ruv) > { > ruv_destroy(&starting_ruv); > } > > prp->stopped = 1; > LDAPDebug( LDAP_DEBUG_TRACE, "<= windows_tot_run\n", 0, 0, 0 ); >Index: ldapserver/ldap/servers/plugins/replication/windowsrepl.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windowsrepl.h,v >retrieving revision 1.15 >diff -u -8 -r1.15 windowsrepl.h >--- ldapserver/ldap/servers/plugins/replication/windowsrepl.h 5 Aug 2008 20:26:22 -0000 1.15 >+++ ldapserver/ldap/servers/plugins/replication/windowsrepl.h 27 Aug 2008 20:53:35 -0000 >@@ -148,16 +148,23 @@ > char **new_dn_string, const Slapi_DN *ds_suffix, const Slapi_DN *ad_suffix); > void winsync_plugin_call_get_new_ds_group_dn_cb(const Repl_Agmt *ra, const Slapi_Entry *rawentry, Slapi_Entry *ad_entry, > char **new_dn_string, const Slapi_DN *ds_suffix, const Slapi_DN *ad_suffix); > > void winsync_plugin_call_pre_ad_mod_user_mods_cb(const Repl_Agmt *ra, const Slapi_Entry *rawentry, const Slapi_DN *local_dn, LDAPMod * const *origmods, Slapi_DN *remote_dn, LDAPMod ***modstosend); > void winsync_plugin_call_pre_ad_mod_group_mods_cb(const Repl_Agmt *ra, const Slapi_Entry *rawentry, const Slapi_DN *local_dn, LDAPMod * const *origmods, Slapi_DN *remote_dn, LDAPMod ***modstosend); > > int winsync_plugin_call_can_add_entry_to_ad_cb(const Repl_Agmt *ra, const Slapi_Entry *local_entry, const Slapi_DN *remote_dn); >+void winsync_plugin_call_begin_update_cb(const Repl_Agmt *ra, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree, int is_total); >+void winsync_plugin_call_end_update_cb(const Repl_Agmt *ra, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree, int is_total); >+void winsync_plugin_call_destroy_agmt_cb(const Repl_Agmt *ra, >+ const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree); > /* > Call stack for all places where windows_LDAPMessage2Entry is called: > > windows_LDAPMessage2Entry > ++windows_seach_entry_ext > ++++windows_search_entry > ++++++windows_get_remote_entry > map_dn_values >Index: ldapserver/ldap/servers/plugins/replication/winsync-plugin.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/winsync-plugin.h,v >retrieving revision 1.1 >diff -u -8 -r1.1 winsync-plugin.h >--- ldapserver/ldap/servers/plugins/replication/winsync-plugin.h 5 Aug 2008 20:26:21 -0000 1.1 >+++ ldapserver/ldap/servers/plugins/replication/winsync-plugin.h 27 Aug 2008 20:53:35 -0000 >@@ -46,21 +46,22 @@ > #include "slapi-plugin.h" > > /* > * WinSync plug-in API > */ > #define WINSYNC_v1_0_GUID "CDA8F029-A3C6-4EBB-80B8-A2E183DB0481" > > /* >- * The plugin will define this callback in order to initialize itself. >- * The ds subtree and the ad subtree from the sync agreement are passed in. >- * These are read only. >- * The return value is private data to the plugin that will be passed back >- * at each callback >+ * This callback is called when a winsync agreement is created. >+ * The ds_subtree and ad_subtree from the agreement are read-only. >+ * The callback can allocate some private data to return. If so >+ * the callback must define a winsync_plugin_destroy_agmt_cb so >+ * that the private data can be freed. This private data is passed >+ * to every other callback function as the void *cookie argument. > */ > typedef void * (*winsync_plugin_init_cb)(const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree); > #define WINSYNC_PLUGIN_INIT_CB 1 > /* agmt_dn - const - the original AD base dn from the winsync agreement > scope - set directly e.g. *scope = 42; > base, filter - malloced - to set, free first e.g. > slapi_ch_free_string(filter); > *base = slapi_ch_strdup("(objectclass=foobar)"); >@@ -156,16 +157,39 @@ > * AD side if it does not already exist. > * local_entry - the candidate entry to test > * remote_DN - the candidate remote entry to add > */ > typedef int (*winsync_can_add_to_ad_cb)(void *cookie, const Slapi_Entry *local_entry, const Slapi_DN *remote_dn); > #define WINSYNC_PLUGIN_CAN_ADD_ENTRY_TO_AD_CB 16 > > /* >+ * Callbacks called at begin and end of update >+ * >+ * The ds subtree and the ad subtree from the sync agreement are passed in. >+ * These are read only. >+ * is_total will be true if this is a total update, or false if this >+ * is an incremental update >+ */ >+typedef void (*winsync_plugin_update_cb)(void *cookie, const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree, int is_total); >+#define WINSYNC_PLUGIN_BEGIN_UPDATE_CB 17 >+#define WINSYNC_PLUGIN_END_UPDATE_CB 18 >+ >+/* >+ * Callbacks called when the agreement is destroyed. >+ * >+ * The ds subtree and the ad subtree from the sync agreement are passed in. >+ * These are read only. >+ * The plugin must define this function to free the cookie allocated >+ * in the init function, if any. >+ */ >+typedef void (*winsync_plugin_destroy_agmt_cb)(void *cookie, const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree); >+#define WINSYNC_PLUGIN_DESTROY_AGMT_CB 19 >+ >+/* > The following are sample code stubs to show how to implement > a plugin which uses this api > */ > > #ifdef WINSYNC_SAMPLE_CODE > > #include "slapi-plugin.h" > #include "winsync-plugin.h" >@@ -413,16 +437,57 @@ > "--> test_winsync_can_add_entry_to_ad_cb -- begin\n"); > > slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, > "<-- test_winsync_can_add_entry_to_ad_cb -- end\n"); > > return 0; /* false - do not allow entries to be added to ad */ > } > >+static void >+test_winsync_begin_update_cb(void *cbdata, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree, int is_total) >+{ >+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, >+ "--> test_winsync_begin_update_cb -- begin\n"); >+ >+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, >+ "<-- test_winsync_begin_update_cb -- end\n"); >+ >+ return; >+} >+ >+static void >+test_winsync_end_update_cb(void *cbdata, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree, int is_total) >+{ >+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, >+ "--> test_winsync_end_update_cb -- begin\n"); >+ >+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, >+ "<-- test_winsync_end_update_cb -- end\n"); >+ >+ return; >+} >+ >+static void >+test_winsync_destroy_agmt_cb(void *cbdata, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree) >+{ >+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, >+ "--> test_winsync_destroy_agmt_cb -- begin\n"); >+ >+ /* free(cbdata); */ >+ >+ slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, >+ "<-- test_winsync_destroy_agmt_cb -- end\n"); >+ >+ return; >+} >+ > /** > * Plugin identifiers > */ > static Slapi_PluginDesc test_winsync_pdesc = { > "test-winsync-plugin", > PLUGIN_MAGIC_VENDOR_STR, > PRODUCTTEXT, > "test winsync plugin" >@@ -442,17 +507,20 @@ > test_winsync_pre_ds_mod_user_cb, > test_winsync_pre_ds_mod_group_cb, > test_winsync_pre_ds_add_user_cb, > test_winsync_pre_ds_add_group_cb, > test_winsync_get_new_ds_user_dn_cb, > test_winsync_get_new_ds_group_dn_cb, > test_winsync_pre_ad_mod_user_mods_cb, > test_winsync_pre_ad_mod_group_mods_cb, >- test_winsync_can_add_entry_to_ad_cb >+ test_winsync_can_add_entry_to_ad_cb, >+ test_winsync_begin_update_cb, >+ test_winsync_end_update_cb, >+ test_winsync_destroy_agmt_cb > }; > > static int > test_winsync_plugin_start(Slapi_PBlock *pb) > { > slapi_log_error(SLAPI_LOG_PLUGIN, test_winsync_plugin_name, > "--> test_winsync_plugin_start -- begin\n"); > >Index: ldapserver/ldap/servers/slapd/slapi-plugin.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v >retrieving revision 1.28 >diff -u -8 -r1.28 slapi-plugin.h >--- ldapserver/ldap/servers/slapd/slapi-plugin.h 5 Aug 2008 22:18:37 -0000 1.28 >+++ ldapserver/ldap/servers/slapd/slapi-plugin.h 27 Aug 2008 20:53:35 -0000 >@@ -1251,16 +1251,30 @@ > * callbacks (i.e., those registered with operation==SLAPI_OPERATION_MODIFY). > * A return value of SLAPI_DSE_CALLBACK_DO_NOT_APPLY is treated the same as > * SLAPI_DSE_CALLBACK_ERROR for all other operations. > */ > #define SLAPI_DSE_CALLBACK_OK (1) > #define SLAPI_DSE_CALLBACK_ERROR (-1) > #define SLAPI_DSE_CALLBACK_DO_NOT_APPLY (0) > >+/* >+ * Flags for slapi_config_register_callback() and >+ * slapi_config_remove_callback() >+ */ >+#define DSE_FLAG_PREOP 0x0001 >+#define DSE_FLAG_POSTOP 0x0002 >+ >+/* This is the size of the returntext parameter passed to the config callback function, >+ which is the "char *" argument to dseCallbackFn above */ >+#define SLAPI_DSE_RETURNTEXT_SIZE 512 /* for use by callback functions */ >+ >+int slapi_config_register_callback(int operation, int flags, const char *base, int scope, const char *filter, dseCallbackFn fn, void *fn_arg); >+int slapi_config_remove_callback(int operation, int flags, const char *base, int scope, const char *filter, dseCallbackFn fn); >+ > /****************************************************************************** > * Online tasks interface (to support import, export, etc) > * After some cleanup, we could consider making these public. > */ > > /* task states */ > #define SLAPI_TASK_SETUP 0 > #define SLAPI_TASK_RUNNING 1 >Index: ldapserver/ldap/servers/slapd/slapi-private.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v >retrieving revision 1.25 >diff -u -8 -r1.25 slapi-private.h >--- ldapserver/ldap/servers/slapd/slapi-private.h 30 Jun 2008 17:28:16 -0000 1.25 >+++ ldapserver/ldap/servers/slapd/slapi-private.h 27 Aug 2008 20:53:35 -0000 >@@ -1064,29 +1064,16 @@ > > /**** End of UniqueID generator interface. ***********************************/ > > > /***************************************************************************** > * JCMREPL - Added for the replication plugin. > */ > >-/* >- * Flags for slapi_config_register_callback() and >- * slapi_config_remove_callback() >- */ >-#define DSE_FLAG_PREOP 0x0001 >-#define DSE_FLAG_POSTOP 0x0002 >- >-/* This is the size of the returntext parameter passed to the config callback function, >- which is the "char *" argument to dseCallbackFn above */ >-#define SLAPI_DSE_RETURNTEXT_SIZE 512 /* for use by callback functions */ >- >-int slapi_config_register_callback(int operation, int flags, const char *base, int scope, const char *filter, dseCallbackFn fn, void *fn_arg); >-int slapi_config_remove_callback(int operation, int flags, const char *base, int scope, const char *filter, dseCallbackFn fn); > int config_is_slapd_lite( void ); > void schema_expand_objectclasses_nolock( Slapi_Entry *e ); > > #define DSE_SCHEMA_NO_LOAD 0x0001 /* schema won't get loaded */ > #define DSE_SCHEMA_NO_CHECK 0x0002 /* schema won't be checked */ > #define DSE_SCHEMA_NO_BACKEND 0x0004 /* don't add as backend */ > > #define DSE_SCHEMA_NO_GLOCK 0x0010 /* don't lock global resources */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 457846
:
313410
|
313411
|
313466
|
313487
| 315142 |
315153
|
316473
|
317429
|
317534
|
317540
|
317614
|
317626
|
317628