r1->source_dsa_obj_guid = ntds_guid;
r1->source_dsa_invocation_id = invocation_id;
r1->replica_flags =
- DRSUAPI_DRS_WRIT_REP |
DRSUAPI_DRS_INIT_SYNC |
- DRSUAPI_DRS_PER_SYNC;
+ DRSUAPI_DRS_PER_SYNC |
+ DRSUAPI_DRS_ADD_REF;
+ if (!s->am_rodc) {
+ r1->replica_flags |= DRSUAPI_DRS_WRIT_REP;
+ }
memset(r1->schedule, 0x11, sizeof(r1->schedule));
dsa_conn->servers = talloc_realloc(dsa_conn, dsa_conn->servers,
const char * const dc_attrs[] = { "objectGUID", "options", NULL };
struct ldb_message_element *el;
unsigned int i;
- bool rodc;
const char *transport_name, *transport_address_attr;
uint64_t site_opts;
el = ldb_msg_find_element(transport, "bridgeheadServerListBL");
- ret = samdb_rodc(ldb, &rodc);
- if (ret != LDB_SUCCESS) {
- DEBUG(1, (__location__ ": unable to tell if we are an RODC: %s\n",
- ldb_strerror(ret)));
- talloc_free(tmp_ctx);
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
-
transport_name = samdb_result_string(transport, "name", NULL);
if (!transport_name) {
DEBUG(1, (__location__ ": failed to find name attribute of "
bool *_found_failed_dcs,
bool *_connected)
{
- bool connected, found_failed_dcs, partial_replica_okay, rodc;
+ bool connected, found_failed_dcs, partial_replica_okay;
NTSTATUS status;
struct ldb_message *site;
TALLOC_CTX *tmp_ctx;
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
- ret = samdb_rodc(ldb, &rodc);
- if (ret != LDB_SUCCESS) {
- DEBUG(1, (__location__ ": Unable to tell if we are an RODC: %s\n",
- ldb_strerror(ret)));
- talloc_free(tmp_ctx);
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
-
for (i = 0; i < st_edge_list.count; i++) {
struct kcctpl_multi_edge *edge;
struct GUID other_site_id;
return status;
}
- if (rodc) {
+ if (service->am_rodc) {
/* TODO: l_bridgehad = nTDSDSA of local DC */
} else {
status = kcctpl_get_bridgehead_dc(service, tmp_ctx,