diff options
-rw-r--r-- | source4/dsdb/repl/drepl_extended.c | 13 | ||||
-rw-r--r-- | source4/dsdb/repl/drepl_fsmo.c | 7 | ||||
-rw-r--r-- | source4/dsdb/repl/drepl_out_pull.c | 2 | ||||
-rw-r--r-- | source4/dsdb/repl/drepl_service.c | 11 | ||||
-rw-r--r-- | source4/dsdb/repl/drepl_service.h | 11 |
5 files changed, 23 insertions, 21 deletions
diff --git a/source4/dsdb/repl/drepl_extended.c b/source4/dsdb/repl/drepl_extended.c index 41fe38b937..67dbedbb9a 100644 --- a/source4/dsdb/repl/drepl_extended.c +++ b/source4/dsdb/repl/drepl_extended.c @@ -113,7 +113,7 @@ static WERROR drepl_create_extended_source_dsa(struct dreplsrv_service *service, } struct extended_op_data { - dreplsrv_fsmo_callback_t callback; + dreplsrv_extended_callback_t callback; void *callback_data; struct dreplsrv_partition_source_dsa *sdsa; }; @@ -136,18 +136,18 @@ static void extended_op_callback(struct dreplsrv_service *service, schedule a getncchanges request to the role owner for an extended operation */ WERROR drepl_request_extended_op(struct dreplsrv_service *service, - struct ldb_dn *role_owner_dn, - struct ldb_dn *fsmo_role_dn, + struct ldb_dn *nc_dn, + struct ldb_dn *source_dsa_dn, enum drsuapi_DsExtendedOperation extended_op, uint64_t fsmo_info, - dreplsrv_fsmo_callback_t callback, + dreplsrv_extended_callback_t callback, void *callback_data) { WERROR werr; struct extended_op_data *data; struct dreplsrv_partition_source_dsa *sdsa; - werr = drepl_create_extended_source_dsa(service, role_owner_dn, fsmo_role_dn, &sdsa); + werr = drepl_create_extended_source_dsa(service, nc_dn, source_dsa_dn, &sdsa); W_ERROR_NOT_OK_RETURN(werr); data = talloc(service, struct extended_op_data); @@ -164,5 +164,8 @@ WERROR drepl_request_extended_op(struct dreplsrv_service *service, talloc_free(sdsa); talloc_free(data); } + + dreplsrv_run_pending_ops(service); + return werr; } diff --git a/source4/dsdb/repl/drepl_fsmo.c b/source4/dsdb/repl/drepl_fsmo.c index 63b831669a..dc7fe27b01 100644 --- a/source4/dsdb/repl/drepl_fsmo.c +++ b/source4/dsdb/repl/drepl_fsmo.c @@ -43,7 +43,6 @@ static void drepl_role_callback(struct dreplsrv_service *service, } else { DEBUG(0,(__location__ ": Successful role transfer\n")); } - service->role_transfer_in_progress = false; } static bool fsmo_master_cmp(struct ldb_dn *ntds_dn, struct ldb_dn *role_owner_dn) @@ -69,12 +68,6 @@ WERROR dreplsrv_fsmo_role_check(struct dreplsrv_service *service, enum drsuapi_DsExtendedOperation extended_op = DRSUAPI_EXOP_NONE; WERROR werr; - if (service->role_transfer_in_progress) { - talloc_free(tmp_ctx); - /* should we allow these in parallel? */ - return WERR_DS_DRA_REPL_PENDING; - } - ntds_dn = samdb_ntds_settings_dn(ldb); if (!ntds_dn) { return WERR_DS_DRA_INTERNAL_ERROR; diff --git a/source4/dsdb/repl/drepl_out_pull.c b/source4/dsdb/repl/drepl_out_pull.c index 21f986ad7b..c13dadc986 100644 --- a/source4/dsdb/repl/drepl_out_pull.c +++ b/source4/dsdb/repl/drepl_out_pull.c @@ -38,7 +38,7 @@ WERROR dreplsrv_schedule_partition_pull_source(struct dreplsrv_service *s, struct dreplsrv_partition_source_dsa *source, enum drsuapi_DsExtendedOperation extended_op, uint64_t fsmo_info, - dreplsrv_fsmo_callback_t callback, + dreplsrv_extended_callback_t callback, void *cb_data) { struct dreplsrv_out_operation *op; diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c index 9a353b0c1f..ae765a5979 100644 --- a/source4/dsdb/repl/drepl_service.c +++ b/source4/dsdb/repl/drepl_service.c @@ -170,7 +170,7 @@ static WERROR _drepl_schedule_replication(struct dreplsrv_service *service, TALLOC_CTX *mem_ctx) { WERROR werr; - dreplsrv_fsmo_callback_t fn_callback = NULL; + dreplsrv_extended_callback_t fn_callback = NULL; if (data) { fn_callback = _drepl_replica_sync_done_cb; @@ -358,12 +358,19 @@ static NTSTATUS drepl_take_FSMO_role(struct irpc_message *msg, static NTSTATUS drepl_trigger_repl_secret(struct irpc_message *msg, struct drepl_trigger_repl_secret *r) { + struct dreplsrv_service *service = talloc_get_type(msg->private_data, + struct dreplsrv_service); + + + drepl_repl_secret(service, r->in.user_dn); + /* we are not going to be sending a reply to this request */ msg->no_reply = true; - DEBUG(0,(__location__ ": got drepl_trigger_repl_secret with %s\n", r->in.user_dn)); + return NT_STATUS_OK; } + /* startup the dsdb replicator service task */ diff --git a/source4/dsdb/repl/drepl_service.h b/source4/dsdb/repl/drepl_service.h index fac555c2e3..d0b523f25b 100644 --- a/source4/dsdb/repl/drepl_service.h +++ b/source4/dsdb/repl/drepl_service.h @@ -103,10 +103,10 @@ struct dreplsrv_partition { bool incoming_only; }; -typedef void (*dreplsrv_fsmo_callback_t)(struct dreplsrv_service *, - WERROR, - enum drsuapi_DsExtendedError, - void *cb_data); +typedef void (*dreplsrv_extended_callback_t)(struct dreplsrv_service *, + WERROR, + enum drsuapi_DsExtendedError, + void *cb_data); struct dreplsrv_out_operation { struct dreplsrv_out_operation *prev, *next; @@ -118,7 +118,7 @@ struct dreplsrv_out_operation { enum drsuapi_DsExtendedOperation extended_op; uint64_t fsmo_info; enum drsuapi_DsExtendedError extended_ret; - dreplsrv_fsmo_callback_t callback; + dreplsrv_extended_callback_t callback; void *cb_data; }; @@ -217,7 +217,6 @@ struct dreplsrv_service { } ops; bool rid_alloc_in_progress; - bool role_transfer_in_progress; bool syncall_workaround; }; |