From 370446769dc0fff752f9fb40c7dcf878cc5cd92e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 23 Sep 2010 15:39:37 -0700 Subject: s4-repl: force on WRIT_REP when we are a writable replica this ensures we always mark ourselves as writeable when we are not an RODC --- source4/dsdb/repl/drepl_extended.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source4/dsdb/repl/drepl_extended.c b/source4/dsdb/repl/drepl_extended.c index 07c2328512..cf1c25a097 100644 --- a/source4/dsdb/repl/drepl_extended.c +++ b/source4/dsdb/repl/drepl_extended.c @@ -102,10 +102,6 @@ static WERROR drepl_create_extended_source_dsa(struct dreplsrv_service *service, return WERR_NOMEM; } - if (!service->am_rodc) { - sdsa->repsFrom1->replica_flags = DRSUAPI_DRS_WRIT_REP; - } - werr = dreplsrv_out_connection_attach(service, sdsa->repsFrom1, &sdsa->conn); if (!W_ERROR_IS_OK(werr)) { DEBUG(0,(__location__ ": Failed to attach connection to %s\n", @@ -147,6 +143,9 @@ static WERROR drepl_create_extended_source_dsa(struct dreplsrv_service *service, } } + if (!service->am_rodc) { + sdsa->repsFrom1->replica_flags |= DRSUAPI_DRS_WRIT_REP; + } *_sdsa = sdsa; return WERR_OK; -- cgit