mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4:dsdb/repl: let drepl_out_helpers.c always go via dreplsrv_out_drsuapi_send()
I have customer backtraces showing that 'drsuapi' is NULL in
dreplsrv_op_pull_source_get_changes_trigger() called from the
WERR_DS_DRA_SCHEMA_MISMATCH retry case of
dreplsrv_op_pull_source_apply_changes_trigger(), while 'drsuapi' was
a valid pointer there.
From reading the code I don't understand how this can happen,
but it does very often on RODCs. And this fix prevents the problem.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15573
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8303078028
)
This commit is contained in:
parent
2954489bd5
commit
0d0fbf2bb8
@ -1043,7 +1043,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
|
||||
|
||||
if (W_ERROR_EQUAL(status, WERR_DS_DRA_SCHEMA_MISMATCH)) {
|
||||
struct dreplsrv_partition *p;
|
||||
bool ok;
|
||||
struct tevent_req *subreq = NULL;
|
||||
|
||||
if (was_schema) {
|
||||
nt_status = werror_to_ntstatus(WERR_BAD_NET_RESP);
|
||||
@ -1141,12 +1141,15 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
|
||||
|
||||
state->retry_started = true;
|
||||
|
||||
ok = dreplsrv_op_pull_source_detect_schema_cycle(req);
|
||||
if (!ok) {
|
||||
subreq = dreplsrv_out_drsuapi_send(state,
|
||||
state->ev,
|
||||
state->op->source_dsa->conn);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
}
|
||||
|
||||
dreplsrv_op_pull_source_get_changes_trigger(req);
|
||||
tevent_req_set_callback(subreq,
|
||||
dreplsrv_op_pull_source_connect_done,
|
||||
req);
|
||||
return;
|
||||
|
||||
} else if (!W_ERROR_IS_OK(status)) {
|
||||
@ -1205,10 +1208,21 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req
|
||||
* operation once we are done.
|
||||
*/
|
||||
if (state->source_dsa_retry != NULL) {
|
||||
struct tevent_req *subreq = NULL;
|
||||
|
||||
state->op->source_dsa = state->source_dsa_retry;
|
||||
state->op->extended_op = state->extended_op_retry;
|
||||
state->source_dsa_retry = NULL;
|
||||
dreplsrv_op_pull_source_get_changes_trigger(req);
|
||||
|
||||
subreq = dreplsrv_out_drsuapi_send(state,
|
||||
state->ev,
|
||||
state->op->source_dsa->conn);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
}
|
||||
tevent_req_set_callback(subreq,
|
||||
dreplsrv_op_pull_source_connect_done,
|
||||
req);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user