diff options
-rw-r--r-- | librpc/rpc/dcesrv_core.c | 18 | ||||
-rw-r--r-- | librpc/rpc/dcesrv_core.h | 6 | ||||
-rw-r--r-- | source3/rpc_server/rpc_ncacn_np.c | 5 | ||||
-rw-r--r-- | source3/winbindd/winbindd_dual_ndr.c | 5 |
4 files changed, 16 insertions, 18 deletions
diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index 0ef85e10df3..52008227242 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -149,12 +149,16 @@ static bool interface_match_by_uuid(const struct dcesrv_interface *iface, /* find the interface operations on an endpoint by uuid */ -_PUBLIC_ const struct dcesrv_interface *find_interface_by_uuid(const struct dcesrv_endpoint *endpoint, - const struct GUID *uuid, uint32_t if_version) +_PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id( + const struct dcesrv_endpoint *endpoint, + const struct ndr_syntax_id *interface) { struct dcesrv_if_list *ifl; for (ifl=endpoint->interface_list; ifl; ifl=ifl->next) { - if (interface_match_by_uuid(ifl->iface, uuid, if_version)) { + if (interface_match_by_uuid( + ifl->iface, + &interface->uuid, + interface->if_version)) { return ifl->iface; } } @@ -1318,10 +1322,8 @@ static NTSTATUS dcesrv_check_or_create_context(struct dcesrv_call_state *call, bool validate_only, const struct ndr_syntax_id *supported_transfer) { - uint32_t if_version; struct dcesrv_connection_context *context; const struct dcesrv_interface *iface; - struct GUID uuid; NTSTATUS status; const struct ndr_syntax_id *selected_transfer = NULL; size_t i; @@ -1357,10 +1359,8 @@ static NTSTATUS dcesrv_check_or_create_context(struct dcesrv_call_state *call, ack->result = DCERPC_BIND_ACK_RESULT_PROVIDER_REJECTION; ack->reason.value = DCERPC_BIND_ACK_REASON_ABSTRACT_SYNTAX_NOT_SUPPORTED; - if_version = ctx->abstract_syntax.if_version; - uuid = ctx->abstract_syntax.uuid; - - iface = find_interface_by_uuid(call->conn->endpoint, &uuid, if_version); + iface = find_interface_by_syntax_id( + call->conn->endpoint, &ctx->abstract_syntax); if (iface == NULL) { struct ndr_syntax_id_buf buf; DBG_NOTICE("Request for unknown dcerpc interface %s\n", diff --git a/librpc/rpc/dcesrv_core.h b/librpc/rpc/dcesrv_core.h index 41ae622ecfe..333671cc3e3 100644 --- a/librpc/rpc/dcesrv_core.h +++ b/librpc/rpc/dcesrv_core.h @@ -626,9 +626,9 @@ _PUBLIC_ NTSTATUS dcesrv_connection_loop_start(struct dcesrv_connection *conn); _PUBLIC_ NTSTATUS dcesrv_call_dispatch_local(struct dcesrv_call_state *call); -_PUBLIC_ const struct dcesrv_interface *find_interface_by_uuid( - const struct dcesrv_endpoint *endpoint, - const struct GUID *uuid, uint32_t if_version); +_PUBLIC_ const struct dcesrv_interface *find_interface_by_syntax_id( + const struct dcesrv_endpoint *endpoint, + const struct ndr_syntax_id *interface); void _dcesrv_save_ndr_fuzz_seed(DATA_BLOB call_blob, struct dcesrv_call_state *call, diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c index 9ba271c2479..569304b3467 100644 --- a/source3/rpc_server/rpc_ncacn_np.c +++ b/source3/rpc_server/rpc_ncacn_np.c @@ -401,9 +401,8 @@ static NTSTATUS make_internal_dcesrv_connection(TALLOC_CTX *mem_ctx, context->conn = conn; context->context_id = 0; context->transfer_syntax = *(conn->preferred_transfer); - context->iface = find_interface_by_uuid(conn->endpoint, - &ndr_table->syntax_id.uuid, - ndr_table->syntax_id.if_version); + context->iface = find_interface_by_syntax_id( + conn->endpoint, &ndr_table->syntax_id); if (context->iface == NULL) { status = NT_STATUS_RPC_INTERFACE_NOT_FOUND; goto fail; diff --git a/source3/winbindd/winbindd_dual_ndr.c b/source3/winbindd/winbindd_dual_ndr.c index f0b8588f6a0..0cc86faeab6 100644 --- a/source3/winbindd/winbindd_dual_ndr.c +++ b/source3/winbindd/winbindd_dual_ndr.c @@ -433,9 +433,8 @@ static NTSTATUS make_internal_dcesrv_connection(TALLOC_CTX *mem_ctx, context->conn = conn; context->context_id = 0; context->transfer_syntax = *(conn->preferred_transfer); - context->iface = find_interface_by_uuid(conn->endpoint, - &ndr_table->syntax_id.uuid, - ndr_table->syntax_id.if_version); + context->iface = find_interface_by_syntax_id( + conn->endpoint, &ndr_table->syntax_id); if (context->iface == NULL) { status = NT_STATUS_RPC_INTERFACE_NOT_FOUND; goto fail; |