1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

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.
This commit is contained in:
Andrew Tridgell 2009-09-14 03:43:26 -07:00
parent 667b825d18
commit 3cf73dfdbd

View File

@ -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;
}