[SCM] Samba Shared Repository - branch master updated

Andrew Tridgell tridge at samba.org
Tue Jan 31 23:50:02 MST 2012


The branch, master has been updated
       via  204c075 Revert "s4-drs: do not try to contact for replication servers that are not anymore in reps*"
      from  42d4152 s4-heimdal: the ASN1 compiler now depends on libreplace

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 204c07501d05f3d7e4657ce4422709ad64e087e2
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed Feb 1 16:14:08 2012 +1100

    Revert "s4-drs: do not try to contact for replication servers that are not anymore in reps*"
    
    This reverts commit 5bfd6251eb22ff701184a95649822a73cf4d157b.
    
    This change has been causing regular segfaults in the build farm since
    it was applied. I also think it may be unnecessary as
    dreplsrv_refresh_partitions() should already be achieving the same
    thing (removing stale replication targets).
    
    I think the segfaults were caused by freeing an in-flight DSA, but I
    have been unable to reproduce it outside of the build farm
    
    Autobuild-User: Andrew Tridgell <tridge at samba.org>
    Autobuild-Date: Wed Feb  1 07:49:42 CET 2012 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/repl/drepl_partitions.c |   42 +++------------------------------
 1 files changed, 4 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index de5d007..07f3339 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -376,7 +376,6 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s,
 						struct dreplsrv_partition *p,
 						struct dreplsrv_partition_source_dsa **listp,
 						struct dreplsrv_partition_source_dsa *check_list,
-						struct dreplsrv_partition_source_dsa **oldlist,
 						const struct ldb_val *val)
 {
 	WERROR status;
@@ -414,16 +413,14 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s,
 	}
 
 	/* re-use an existing source if found */
-	for (s2=*oldlist; s2; s2=s2->next) {
+	for (s2=*listp; s2; s2=s2->next) {
 		if (GUID_compare(&s2->repsFrom1->source_dsa_obj_guid, 
 				 &source->repsFrom1->source_dsa_obj_guid) == 0) {
 			talloc_free(s2->repsFrom1->other_info);
 			*s2->repsFrom1 = *source->repsFrom1;
 			talloc_steal(s2, s2->repsFrom1->other_info);
 			talloc_free(source);
-			source = s2;
-			DLIST_REMOVE(*oldlist, s2);
-			break;
+			return WERR_OK;
 		}
 	}
 
@@ -569,7 +566,6 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
 		NULL
 	};
 	struct ldb_dn *dn;
-	struct dreplsrv_partition_source_dsa *src, *oldsources, *oldnotifies;
 
 	DEBUG(4, ("dreplsrv_refresh_partition(%s)\n",
 		ldb_dn_get_linearized(p->dn)));
@@ -611,52 +607,22 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s,
 
 	status = WERR_OK;
 
-	oldsources = p->sources;
-	p->sources = NULL;
 	if (r != NULL && (orf_el = ldb_msg_find_element(r->msgs[0], "repsFrom"))) {
 		for (i=0; i < orf_el->num_values; i++) {
 			status = dreplsrv_partition_add_source_dsa(s, p, &p->sources,
-								   NULL, &oldsources,
-								   &orf_el->values[i]);
+								   NULL, &orf_el->values[i]);
 			W_ERROR_NOT_OK_GOTO_DONE(status);
 		}
-	} else {
-		if (r != NULL && p->sources) {
-			DEBUG(0, ("repsFrom do not exists or is empty\n"));
-		}
 	}
 
-	oldnotifies = p->notifies;
-	p->notifies = NULL;
 	if (r != NULL && (orf_el = ldb_msg_find_element(r->msgs[0], "repsTo"))) {
 		for (i=0; i < orf_el->num_values; i++) {
 			status = dreplsrv_partition_add_source_dsa(s, p, &p->notifies,
-								   p->sources,
-								   &oldnotifies,
-								   &orf_el->values[i]);
+								   p->sources, &orf_el->values[i]);
 			W_ERROR_NOT_OK_GOTO_DONE(status);
 		}
 	}
 
-	if (oldsources) {
-		src = oldsources;
-		while(src) {
-			struct dreplsrv_partition_source_dsa *tmp = src->next;
-			talloc_free(src);
-			src = tmp;
-		}
-	}
-
-
-	if (oldnotifies) {
-		src = oldnotifies;
-		while(src) {
-			struct dreplsrv_partition_source_dsa *tmp = src->next;
-			talloc_free(src);
-			src = tmp;
-		}
-	}
-
 done:
 	talloc_free(mem_ctx);
 	return status;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list