From: Andrew Tridgell Date: Mon, 14 Sep 2009 10:43:26 +0000 (-0700) Subject: s4-repl: fall back to repsFrom if repsTo not set X-Git-Tag: talloc-2.0.1~519^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cf73dfdbdd33189e0f9f22e0e494962376f9b86;p=thirdparty%2Fsamba.git s4-repl: fall back to repsFrom if repsTo not set Windows does not seem to be always setting up repsTo using DsUpdateRefs(). For now we will fall back to using repsFrom if repsTo is empty. This is almost certainly incorrect, but it does get notification based replication working with both w2k3 and w2k8. --- diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c index 83c6df48dc2..73280917c52 100644 --- a/source4/dsdb/repl/drepl_notify.c +++ b/source4/dsdb/repl/drepl_notify.c @@ -293,13 +293,16 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service *s, struct dreplsrv_partition *p, TALLOC_CTX *mem_ctx) { - uint32_t count; + uint32_t count=0; struct repsFromToBlob *reps; WERROR werr; uint64_t uSN; int ret, i; werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsTo", &reps, &count); + if (count == 0) { + werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsFrom", &reps, &count); + } if (!W_ERROR_IS_OK(werr)) { DEBUG(0,(__location__ ": Failed to load repsTo for %s\n", ldb_dn_get_linearized(p->dn))); @@ -331,7 +334,6 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service *s, } } - return WERR_OK; }