diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c index 7ba5c797267..bf2017ee9c6 100644 --- a/source4/dsdb/repl/drepl_out_helpers.c +++ b/source4/dsdb/repl/drepl_out_helpers.c @@ -119,9 +119,10 @@ static void dreplsrv_out_drsuapi_connect_done(struct composite_context *creq) state->drsuapi->drsuapi_handle = state->drsuapi->pipe->binding_handle; - status = gensec_session_key(state->drsuapi->pipe->conn->security_state.generic_state, - state->drsuapi, - &state->drsuapi->gensec_skey); + status = dcerpc_binding_handle_auth_session_key( + state->drsuapi->drsuapi_handle, + state->drsuapi, + &state->drsuapi->gensec_skey); if (tevent_req_nterror(req, status)) { return; }