diff options
author | Volker Lendecke <vl@samba.org> | 2021-01-16 20:28:42 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2021-01-26 00:10:31 +0000 |
commit | cc456ac882a59b134be34aced82c01d8fcce6d72 (patch) | |
tree | dfdca617a6a313190a83641c96cae5d5a0f47b7b /source3/rpc_server | |
parent | f0aa39017b62d46a99e73aa62e8208281382d479 (diff) | |
download | samba-cc456ac882a59b134be34aced82c01d8fcce6d72.tar.gz |
rpc_server: Pass dcerpc_binding to dcesrv_create_ncalrpc_socket()
It does not need a dcesrv_endpoint.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/rpc_server.c | 10 | ||||
-rw-r--r-- | source3/rpc_server/rpc_server.h | 2 | ||||
-rw-r--r-- | source3/rpc_server/rpc_service_setup.c | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 20b727b64df..0e3e0e14e95 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -178,14 +178,13 @@ NTSTATUS dcesrv_create_ncacn_ip_tcp_socket(const struct sockaddr_storage *ifss, * Start listening on the ncalrpc socket ********************************************************************/ -NTSTATUS dcesrv_create_ncalrpc_socket(struct dcesrv_endpoint *e, int *out_fd) +NTSTATUS dcesrv_create_ncalrpc_socket(struct dcerpc_binding *b, int *out_fd) { int fd = -1; const char *endpoint = NULL; NTSTATUS status; - endpoint = dcerpc_binding_get_string_option(e->ep_description, - "endpoint"); + endpoint = dcerpc_binding_get_string_option(b, "endpoint"); if (endpoint == NULL) { /* * No identifier specified: use DEFAULT or SMBD. @@ -205,9 +204,8 @@ NTSTATUS dcesrv_create_ncalrpc_socket(struct dcesrv_endpoint *e, int *out_fd) } else { endpoint = "DEFAULT"; } - status = dcerpc_binding_set_string_option(e->ep_description, - "endpoint", - endpoint); + status = dcerpc_binding_set_string_option( + b, "endpoint", endpoint); if (!NT_STATUS_IS_OK(status)) { DBG_ERR("Failed to set ncalrpc 'endpoint' binding " "string option to '%s': %s\n", diff --git a/source3/rpc_server/rpc_server.h b/source3/rpc_server/rpc_server.h index e4a18eb830a..563fb6bf3f2 100644 --- a/source3/rpc_server/rpc_server.h +++ b/source3/rpc_server/rpc_server.h @@ -73,7 +73,7 @@ NTSTATUS dcesrv_create_ncacn_ip_tcp_socket(const struct sockaddr_storage *ifss, uint16_t *port, int *out_fd); -NTSTATUS dcesrv_create_ncalrpc_socket(struct dcesrv_endpoint *e, int *fd); +NTSTATUS dcesrv_create_ncalrpc_socket(struct dcerpc_binding *b, int *fd); struct dcerpc_ncacn_listen_state; int dcesrv_setup_ncacn_listener( diff --git a/source3/rpc_server/rpc_service_setup.c b/source3/rpc_server/rpc_service_setup.c index abdd3b81af8..c82e28be4a7 100644 --- a/source3/rpc_server/rpc_service_setup.c +++ b/source3/rpc_server/rpc_service_setup.c @@ -114,7 +114,7 @@ NTSTATUS dcesrv_create_endpoint_sockets(struct tevent_context *ev_ctx, switch (transport) { case NCALRPC: - status = dcesrv_create_ncalrpc_socket(e, fds); + status = dcesrv_create_ncalrpc_socket(e->ep_description, fds); break; case NCACN_IP_TCP: { @@ -269,7 +269,7 @@ NTSTATUS dcesrv_setup_endpoint_sockets(struct tevent_context *ev_ctx, switch (transport) { case NCALRPC: - status = dcesrv_create_ncalrpc_socket(e, &fd); + status = dcesrv_create_ncalrpc_socket(e->ep_description, &fd); break; case NCACN_IP_TCP: |