[csw-devel] SF.net SVN: gar:[21365] csw/mgar/pkg/389-ds-base/trunk
cgrzemba at users.sourceforge.net
cgrzemba at users.sourceforge.net
Tue Jun 18 11:16:25 CEST 2013
Revision: 21365
http://gar.svn.sourceforge.net/gar/?rev=21365&view=rev
Author: cgrzemba
Date: 2013-06-18 09:16:23 +0000 (Tue, 18 Jun 2013)
Log Message:
-----------
389-ds-base/trunk: add fix for ticket 47327
Modified Paths:
--------------
csw/mgar/pkg/389-ds-base/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/389-ds-base/trunk/files/0012-fix-for-47327.patch
Modified: csw/mgar/pkg/389-ds-base/trunk/Makefile
===================================================================
--- csw/mgar/pkg/389-ds-base/trunk/Makefile 2013-06-18 08:19:01 UTC (rev 21364)
+++ csw/mgar/pkg/389-ds-base/trunk/Makefile 2013-06-18 09:16:23 UTC (rev 21365)
@@ -38,6 +38,7 @@
PATCHFILES += 0010-mntent-config.ac.patch
PATCHFILES += 0011-Makefile.am.patch
PATCHFILES += 0009-fix-for-550-memberuid-not-created.patch
+PATCHFILES += 0012-fix-for-47327.patch
BUILD_DEP_PKGS += CSWautoconf
Added: csw/mgar/pkg/389-ds-base/trunk/files/0012-fix-for-47327.patch
===================================================================
--- csw/mgar/pkg/389-ds-base/trunk/files/0012-fix-for-47327.patch (rev 0)
+++ csw/mgar/pkg/389-ds-base/trunk/files/0012-fix-for-47327.patch 2013-06-18 09:16:23 UTC (rev 21365)
@@ -0,0 +1,56 @@
+--- a/ldap/servers/plugins/replication/windows_protocol_util.c
++++ b/ldap/servers/plugins/replication/windows_protocol_util.c
+@@ -3799,8 +3799,7 @@ map_entry_dn_inbound_ext(Slapi_Entry *e, Slapi_DN **dn, const Repl_Agmt *ra, int
+ windows_private_get_windows_subtree(ra));
+ }
+ }
+- new_dn = slapi_sdn_new_dn_byval(new_dn_string);
+- PR_smprintf_free(new_dn_string);
++ new_dn = slapi_sdn_new_normdn_passin(new_dn_string);
+ slapi_ch_free_string(&container_str);
+ /* Clear any earlier error */
+ retval = 0;
+@@ -3895,6 +3894,7 @@ is_subject_of_agreement_remote(Slapi_Entry *e, const Repl_Agmt *ra)
+ int retval = 0;
+ int is_in_subtree = 0;
+ const Slapi_DN *agreement_subtree = NULL;
++ const Slapi_DN *sdn;
+
+ /* First test for the sync'ed subtree */
+ agreement_subtree = windows_private_get_windows_subtree(ra);
+@@ -3902,10 +3902,33 @@ is_subject_of_agreement_remote(Slapi_Entry *e, const Repl_Agmt *ra)
+ {
+ goto error;
+ }
+- is_in_subtree = slapi_sdn_scope_test(slapi_entry_get_sdn_const(e), agreement_subtree, LDAP_SCOPE_SUBTREE);
++ sdn = slapi_entry_get_sdn_const(e);
++ is_in_subtree = slapi_sdn_scope_test(sdn, agreement_subtree, LDAP_SCOPE_SUBTREE);
+ if (is_in_subtree)
+ {
+- retval = 1;
++ Slapi_DN psdn = {0};
++ Slapi_Entry *pentry = NULL;
++ /*
++ * Check whether the parent of the entry exists or not.
++ * If it does not, treat the entry e is out of scope.
++ * For instance, agreement_subtree is cn=USER,<SUFFIX>
++ * cn=container,cn=USER,<SUFFIX> is not synchronized.
++ * If 'e' is uid=test,cn=container,cn=USER,<SUFFIX>,
++ * the entry is not synchronized, either. We treat
++ * 'e' as out of scope.
++ */
++ slapi_sdn_get_parent(sdn, &psdn);
++ if (0 == slapi_sdn_compare(&psdn, agreement_subtree)) {
++ retval = 1;
++ } else {
++ /* If parent entry is not local, the entry is out of scope */
++ int rc = windows_get_local_entry(&psdn, &pentry);
++ if ((0 == rc) && pentry) {
++ retval = 1;
++ slapi_entry_free(pentry);
++ }
++ }
++ slapi_sdn_done(&psdn);
+ }
+ error:
+ return retval;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list