diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index c0567bb27f0..ff38bba997b 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -2909,6 +2909,28 @@ static void dcesrv_read_fragment_done(struct tevent_req *subreq) return; } + dcesrv_loop_next_packet(dce_conn, pkt, buffer); +} + +/** + * @brief Start the dcesrv loop, inducing the bind as a blob + * + * Like dcesrv_connection_loop_start() but used from connections + * where the caller has already read the dcerpc bind packet from + * the socket and is available as a DATA_BLOB. + * + * @param[in] dce_conn The connection to start + * @param[in] pkt The parsed bind packet + * @param[in] buffer The full binary bind including auth data + */ +void dcesrv_loop_next_packet( + struct dcesrv_connection *dce_conn, + struct ncacn_packet *pkt, + DATA_BLOB buffer) +{ + struct tevent_req *subreq = NULL; + NTSTATUS status; + status = dcesrv_process_ncacn_packet(dce_conn, pkt, buffer); if (!NT_STATUS_IS_OK(status)) { dcesrv_terminate_connection(dce_conn, nt_errstr(status)); diff --git a/librpc/rpc/dcesrv_core.h b/librpc/rpc/dcesrv_core.h index 289cdebaa19..1c0d346bfe4 100644 --- a/librpc/rpc/dcesrv_core.h +++ b/librpc/rpc/dcesrv_core.h @@ -640,6 +640,11 @@ _PUBLIC_ void dcesrv_sock_report_output_data(struct dcesrv_connection *dce_conn) _PUBLIC_ NTSTATUS dcesrv_connection_loop_start(struct dcesrv_connection *conn); +_PUBLIC_ void dcesrv_loop_next_packet( + struct dcesrv_connection *dce_conn, + struct ncacn_packet *pkt, + DATA_BLOB buffer); + _PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call); _PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id(