From: Jeremy Allison Date: Thu, 4 Aug 2016 18:09:21 +0000 (-0700) Subject: s4: repl: Ensure all error paths in dreplsrv_op_pull_source_get_changes_trigger(... X-Git-Tag: tevent-0.9.30~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ddd01dd21d5db9440dd382190e203c1e756fa3a;p=thirdparty%2Fsamba.git s4: repl: Ensure all error paths in dreplsrv_op_pull_source_get_changes_trigger() are protected with tevent returns. Otherwise dreplsrv_op_pull_source_get_changes_trigger() could infinitely recurse. Signed-off-by: Jeremy Allison Reviewed-by: Michael Adam Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Aug 6 01:24:05 CEST 2016 on sn-devel-144 --- diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c index bf8a372a982..2a74cb73b2c 100644 --- a/source4/dsdb/repl/drepl_out_helpers.c +++ b/source4/dsdb/repl/drepl_out_helpers.c @@ -446,6 +446,8 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req) if (!W_ERROR_IS_OK(werr)) { DEBUG(0,(__location__ ": Failed to convert UDV for %s : %s\n", ldb_dn_get_linearized(partition->dn), win_errstr(werr))); + tevent_req_nterror(req, werror_to_ntstatus(werr)); + return; } } @@ -470,6 +472,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req) status = dreplsrv_get_gc_partial_attribute_set(service, r, &pas); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,(__location__ ": Failed to construct GC partial attribute set : %s\n", nt_errstr(status))); + tevent_req_nterror(req, status); return; } replica_flags &= ~DRSUAPI_DRS_WRIT_REP; @@ -482,6 +485,7 @@ static void dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req) status = dreplsrv_get_rodc_partial_attribute_set(service, r, &pas, for_schema); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,(__location__ ": Failed to construct RODC partial attribute set : %s\n", nt_errstr(status))); + tevent_req_nterror(req, status); return; } replica_flags &= ~DRSUAPI_DRS_WRIT_REP;