summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-22 22:50:05 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-23 07:17:57 +0000
commitd2008fbbb951a941d380b4efa0eaf9f3cfe54e13 (patch)
treee99bac3530fa9a992ed590a10d6f565f635ba275
parent7a05e04dfc81d20aff92e17c61af81bbe66d2492 (diff)
downloadsamba-d2008fbbb951a941d380b4efa0eaf9f3cfe54e13.tar.gz
samba-d2008fbbb951a941d380b4efa0eaf9f3cfe54e13.tar.bz2
samba-d2008fbbb951a941d380b4efa0eaf9f3cfe54e13.zip
s4-kcc: the kcc should not be setting the repsTo attribute
repsTo is set by other DCs, when they ask to be notified about changes in a partition
-rw-r--r--source4/dsdb/kcc/kcc_periodic.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index bfb6bdc3a5..447ef1e30c 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -165,8 +165,8 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ct
/* update the repsFrom on all partitions */
for (p=s->partitions; p; p=p->next) {
- struct repsFromToBlob *old_reps, *reps_to;
- uint32_t old_count, to_count;
+ struct repsFromToBlob *old_reps;
+ uint32_t old_count;
WERROR werr;
uint32_t i;
bool modified = false;
@@ -213,36 +213,6 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ct
/* dreplsrv should refresh its state */
notify_dreplsrv = true;
}
-
- werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsTo", &reps_to, &to_count);
- if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0,(__location__ ": Failed to load repsTo from %s - %s\n",
- ldb_dn_get_linearized(p->dn), ldb_errstring(s->samdb)));
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
-
- modified = false;
- /* add any new ones */
- for (i=0; i<old_count; i++) {
- if (!reps_in_list(&old_reps[i], reps_to, to_count)) {
- reps_to = talloc_realloc(mem_ctx, reps_to, struct repsFromToBlob, to_count+1);
- NT_STATUS_HAVE_NO_MEMORY(reps_to);
- reps_to[to_count] = old_reps[i];
- to_count++;
- modified = true;
- }
- }
-
- if (modified) {
- werr = dsdb_savereps(s->samdb, mem_ctx, p->dn, "repsTo", reps_to, to_count);
- if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0,(__location__ ": Failed to save repsTo to %s - %s\n",
- ldb_dn_get_linearized(p->dn), ldb_errstring(s->samdb)));
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
- /* dreplsrv should refresh its state */
- notify_dreplsrv = true;
- }
}
/* notify dreplsrv toplogy has changed */