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 314730 Details for
Bug 459729
Windows sync support in IPA
[?]
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]
add ipa-winsync to ipa makefiles, spec files
0002-Added-the-new-IPA-WinSync-Plug-in.patch (text/plain), 10.24 KB, created by
Rich Megginson
on 2008-08-21 17:16:30 UTC
(
hide
)
Description:
add ipa-winsync to ipa makefiles, spec files
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2008-08-21 17:16:30 UTC
Size:
10.24 KB
patch
obsolete
>From e1adabd6defda7bf40b4cb93d1cdf7706d28925e Mon Sep 17 00:00:00 2001 >From: Rich Megginson <rmeggins@redhat.com> >Date: Fri, 15 Aug 2008 17:37:45 -0600 >Subject: [PATCH] Added the new IPA WinSync Plug-in > Work done so far > * added the new plugin to makefiles, spec file > * added stubs for the api, including begin update, end update, and destroy callbacks > * added config code to allow dynamic dse config changes and auto-discovery of realm and new user objectclass list > >--- > ipa-server/configure.ac | 1 + > ipa-server/ipa-server.spec.in | 5 + > ipa-server/ipa-slapi-plugins/Makefile.am | 1 + > .../ipa-slapi-plugins/ipa-winsync/Makefile.am | 6 +- > .../ipa-slapi-plugins/ipa-winsync/ipa-winsync.c | 116 +++++++++++++++++--- > 5 files changed, 111 insertions(+), 18 deletions(-) > >diff --git a/ipa-server/configure.ac b/ipa-server/configure.ac >index 7260559..a03e45f 100644 >--- a/ipa-server/configure.ac >+++ b/ipa-server/configure.ac >@@ -253,6 +253,7 @@ AC_CONFIG_FILES([ > ipa-slapi-plugins/dna/Makefile > ipa-slapi-plugins/ipa-memberof/Makefile > ipa-slapi-plugins/ipa-pwd-extop/Makefile >+ ipa-slapi-plugins/ipa-winsync/Makefile > xmlrpc-server/Makefile > xmlrpc-server/test/Makefile > man/Makefile >diff --git a/ipa-server/ipa-server.spec.in b/ipa-server/ipa-server.spec.in >index f8de8aa..64ca299 100644 >--- a/ipa-server/ipa-server.spec.in >+++ b/ipa-server/ipa-server.spec.in >@@ -70,6 +70,7 @@ make install > rm %{buildroot}/%{plugin_dir}/libipa_pwd_extop.la > rm %{buildroot}/%{plugin_dir}/libipa-memberof-plugin.la > rm %{buildroot}/%{plugin_dir}/libipa-dna-plugin.la >+rm %{buildroot}/%{plugin_dir}/libipa-winsync.la > > # Some user-modifiable HTML files are provided. Move these to /etc > # and link back. >@@ -154,6 +155,7 @@ fi > %attr(755,root,root) %{plugin_dir}/libipa_pwd_extop.so > %attr(755,root,root) %{plugin_dir}/libipa-memberof-plugin.so > %attr(755,root,root) %{plugin_dir}/libipa-dna-plugin.so >+%attr(755,root,root) %{plugin_dir}/libipa-winsync.so > > %dir %{_localstatedir}/lib/ipa > %attr(700,root,root) %dir %{_localstatedir}/lib/ipa/sysrestore >@@ -171,6 +173,9 @@ fi > %{_mandir}/man1/ipa-server-install.1.gz > > %changelog >+* Wed Aug 13 2008 Rich Megginson <rmeggins@redhat.com> - 1.0.0-4 >+- Added libipa-winsync.so >+ > * Wed Jul 23 2008 Rob Crittenden <rcritten@redhat.com> - 1.0.0-3 > - Move location of the self-signed CA serial number > >diff --git a/ipa-server/ipa-slapi-plugins/Makefile.am b/ipa-server/ipa-slapi-plugins/Makefile.am >index 134f29d..f316371 100644 >--- a/ipa-server/ipa-slapi-plugins/Makefile.am >+++ b/ipa-server/ipa-slapi-plugins/Makefile.am >@@ -4,6 +4,7 @@ SUBDIRS = \ > ipa-pwd-extop \ > ipa-memberof \ > dna \ >+ ipa-winsync \ > $(NULL) > > EXTRA_DIST = \ >diff --git a/ipa-server/ipa-slapi-plugins/ipa-winsync/Makefile.am b/ipa-server/ipa-slapi-plugins/ipa-winsync/Makefile.am >index e8375ba..94bc2dc 100644 >--- a/ipa-server/ipa-slapi-plugins/ipa-winsync/Makefile.am >+++ b/ipa-server/ipa-slapi-plugins/ipa-winsync/Makefile.am >@@ -8,6 +8,7 @@ INCLUDES = \ > -DLIBDIR=\""$(libdir)"\" \ > -DLIBEXECDIR=\""$(libexecdir)"\" \ > -DDATADIR=\""$(datadir)"\" \ >+ $(MOZLDAP_CFLAGS) \ > $(WARN_CFLAGS) \ > $(NULL) > >@@ -17,14 +18,13 @@ plugin_LTLIBRARIES = \ > $(NULL) > > libipa_winsync_la_SOURCES = \ >- ipa_winsync.c \ >+ ipa-winsync.c \ >+ ipa-winsync-config.c \ > $(NULL) > > libipa_winsync_la_LDFLAGS = -avoid-version > > #libipa_winsync_la_LIBADD = \ >-# $(KRB5_LIBS) \ >-# $(SSL_LIBS) \ > # $(MOZLDAP_LIBS) \ > # $(NULL) > >diff --git a/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c b/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c >index bad907b..2c29567 100644 >--- a/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c >+++ b/ipa-server/ipa-slapi-plugins/ipa-winsync/ipa-winsync.c >@@ -52,8 +52,9 @@ > > #include <dirsrv/slapi-plugin.h> > #include <dirsrv/winsync-plugin.h> >+#include <ipa-winsync.h> > >-static char *ipa_winsync_plugin_name = "ipa-winsync"; >+static char *ipa_winsync_plugin_name = IPA_WINSYNC_PLUGIN_NAME; > > /* This is called when a new agreement is created or loaded > at startup. >@@ -61,15 +62,19 @@ static char *ipa_winsync_plugin_name = "ipa-winsync"; > static void * > ipa_winsync_agmt_init(const Slapi_DN *ds_subtree, const Slapi_DN *ad_subtree) > { >+ void *cbdata = NULL; > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "--> ipa_winsync_agmt_init [%s] [%s] -- begin\n", > slapi_sdn_get_dn(ds_subtree), > slapi_sdn_get_dn(ad_subtree)); > >+ /* do the domain specific configuration based on the ds subtree */ >+ cbdata = ipa_winsync_config_new_domain(ds_subtree, ad_subtree); >+ > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "<-- ipa_winsync_agmt_init -- end\n"); > >- return NULL; >+ return cbdata; > } > > static void >@@ -202,6 +207,8 @@ ipa_winsync_pre_ds_add_user_cb(void *cbdata, const Slapi_Entry *rawentry, > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "--> ipa_winsync_pre_ds_add_user_cb -- begin\n"); > >+ /* add the objectclasses to the entry */ >+ > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "<-- ipa_winsync_pre_ds_add_user_cb -- end\n"); > >@@ -239,7 +246,7 @@ ipa_winsync_get_new_ds_user_dn_cb(void *cbdata, const Slapi_Entry *rawentry, > } > > slapi_ch_free_string(new_dn_string); >- *new_dn_string = PR_smprintf("%s,%s", rdns[0], slapi_sdn_get_dn(ds_suffix)); >+ *new_dn_string = slapi_ch_smprintf("%s,%s", rdns[0], slapi_sdn_get_dn(ds_suffix)); > ldap_value_free(rdns); > > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, >@@ -304,17 +311,48 @@ ipa_winsync_can_add_entry_to_ad_cb(void *cbdata, const Slapi_Entry *local_entry, > return 0; /* false - do not allow entries to be added to ad */ > } > >-/** >- * Plugin identifiers >- */ >-static Slapi_PluginDesc ipa_winsync_pdesc = { >- "ipa-winsync-plugin", >- PLUGIN_MAGIC_VENDOR_STR, >- PRODUCTTEXT, >- "ipa winsync plugin" >-}; >+static void >+ipa_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, ipa_winsync_plugin_name, >+ "--> ipa_winsync_begin_update_cb -- begin\n"); > >-static Slapi_ComponentId *ipa_winsync_plugin_id = NULL; >+ ipa_winsync_config_refresh_domain(cbdata, ds_subtree, ad_subtree); >+ >+ slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, >+ "<-- ipa_winsync_begin_update_cb -- end\n"); >+ >+ return; >+} >+ >+static void >+ipa_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, ipa_winsync_plugin_name, >+ "--> ipa_winsync_end_update_cb -- begin\n"); >+ >+ slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, >+ "<-- ipa_winsync_end_update_cb -- end\n"); >+ >+ return; >+} >+ >+static void >+ipa_winsync_destroy_agmt_cb(void *cbdata, const Slapi_DN *ds_subtree, >+ const Slapi_DN *ad_subtree) >+{ >+ slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, >+ "--> ipa_winsync_destroy_agmt_cb -- begin\n"); >+ >+ ipa_winsync_config_destroy_domain(cbdata, ds_subtree, ad_subtree); >+ >+ slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, >+ "<-- ipa_winsync_destroy_agmt_cb -- end\n"); >+ >+ return; >+} > > static void *ipa_winsync_api[] = { > NULL, /* reserved for api broker use, must be zero */ >@@ -333,12 +371,44 @@ static void *ipa_winsync_api[] = { > ipa_winsync_get_new_ds_group_dn_cb, > ipa_winsync_pre_ad_mod_user_mods_cb, > ipa_winsync_pre_ad_mod_group_mods_cb, >- ipa_winsync_can_add_entry_to_ad_cb >+ ipa_winsync_can_add_entry_to_ad_cb, >+ ipa_winsync_begin_update_cb, >+ ipa_winsync_end_update_cb, >+ ipa_winsync_destroy_agmt_cb >+}; >+ >+/** >+ * Plugin identifiers >+ */ >+static Slapi_PluginDesc ipa_winsync_pdesc = { >+ "ipa-winsync-plugin", >+ "FreeIPA project", >+ "FreeIPA/1.0", >+ "ipa winsync plugin" > }; > >+static Slapi_ComponentId *ipa_winsync_plugin_id = NULL; >+ >+/* >+** Plugin identity mgmt >+*/ >+ >+void ipa_winsync_set_plugin_identity(void * identity) >+{ >+ ipa_winsync_plugin_id=identity; >+} >+ >+void * ipa_winsync_get_plugin_identity() >+{ >+ return ipa_winsync_plugin_id; >+} >+ > static int > ipa_winsync_plugin_start(Slapi_PBlock *pb) > { >+ int rc; >+ Slapi_Entry *config_e = NULL; /* entry containing plugin config */ >+ > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "--> ipa_winsync_plugin_start -- begin\n"); > >@@ -348,6 +418,18 @@ ipa_winsync_plugin_start(Slapi_PBlock *pb) > return -1; > } > >+ if ( slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &config_e ) != 0 ) { >+ slapi_log_error( SLAPI_LOG_FATAL, ipa_winsync_plugin_name, >+ "missing config entry\n" ); >+ return( -1 ); >+ } >+ >+ if (( rc = ipa_winsync_config( config_e )) != LDAP_SUCCESS ) { >+ slapi_log_error( SLAPI_LOG_FATAL, ipa_winsync_plugin_name, >+ "configuration failed (%s)\n", ldap_err2string( rc )); >+ return( -1 ); >+ } >+ > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "<-- ipa_winsync_plugin_start -- end\n"); > return 0; >@@ -371,6 +453,8 @@ ipa_winsync_plugin_close(Slapi_PBlock *pb) > */ > int ipa_winsync_plugin_init(Slapi_PBlock *pb) > { >+ void *plugin_id = NULL; >+ > slapi_log_error(SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "--> ipa_winsync_plugin_init -- begin\n"); > >@@ -390,12 +474,14 @@ int ipa_winsync_plugin_init(Slapi_PBlock *pb) > > /* Retrieve and save the plugin identity to later pass to > internal operations */ >- if (slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &ipa_winsync_plugin_id) != 0) { >+ if (slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &plugin_id) != 0) { > slapi_log_error(SLAPI_LOG_FATAL, ipa_winsync_plugin_name, > "<-- ipa_winsync_plugin_init -- failed to retrieve plugin identity -- end\n"); > return -1; > } > >+ ipa_winsync_set_plugin_identity(plugin_id); >+ > slapi_log_error( SLAPI_LOG_PLUGIN, ipa_winsync_plugin_name, > "<-- ipa_winsync_plugin_init -- end\n"); > return 0; >-- >1.5.5.1 >
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 459729
:
314729
| 314730 |
314731
|
314732
|
314733
|
314844
|
314845
|
316460
|
317002
|
317807
|
318214
|
319412
|
319413
|
319414
|
319415
|
319416
|
319786
|
320039
|
320040