]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_server: Pass dcerpc_binding to dcesrv_create_ncacn_ip_tcp_sockets()
authorVolker Lendecke <vl@samba.org>
Sat, 16 Jan 2021 19:32:38 +0000 (20:32 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 26 Jan 2021 00:10:31 +0000 (00:10 +0000)
It does not need a dcesrv_endpoint.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/rpc_service_setup.c
source3/rpc_server/rpc_sock_helper.c
source3/rpc_server/rpc_sock_helper.h

index c82e28be4a77e2a2df12c33b60187952ad29e7b0..3fd4eeb96c88a3a55d17035ef7f697f51a69a93d 100644 (file)
@@ -121,7 +121,7 @@ NTSTATUS dcesrv_create_endpoint_sockets(struct tevent_context *ev_ctx,
                TALLOC_FREE(fds);
 
                status = dcesrv_create_ncacn_ip_tcp_sockets(
-                       e, talloc_tos(), &num_fds, &fds);
+                       e->ep_description, talloc_tos(), &num_fds, &fds);
                break;
        }
 
@@ -274,7 +274,7 @@ NTSTATUS dcesrv_setup_endpoint_sockets(struct tevent_context *ev_ctx,
 
        case NCACN_IP_TCP:
                status = dcesrv_create_ncacn_ip_tcp_sockets(
-                       e, frame, &num_fds, &fds);
+                       e->ep_description, frame, &num_fds, &fds);
                break;
 
        case NCACN_NP:
index 27d5cda9c4e6a8d8ed3814dddc251b2fd80fbfba..75a432fb15b636c87831abfd60e90647a2553153 100644 (file)
@@ -33,7 +33,7 @@
 #define DBGC_CLASS DBGC_RPC_SRV
 
 NTSTATUS dcesrv_create_ncacn_ip_tcp_sockets(
-       struct dcesrv_endpoint *e,
+       struct dcerpc_binding *b,
        TALLOC_CTX *mem_ctx,
        size_t *pnum_fds,
        int **pfds)
@@ -47,8 +47,7 @@ NTSTATUS dcesrv_create_ncacn_ip_tcp_sockets(
        NTSTATUS status = NT_STATUS_INVALID_PARAMETER;
        bool ok;
 
-       endpoint = dcerpc_binding_get_string_option(
-               e->ep_description, "endpoint");
+       endpoint = dcerpc_binding_get_string_option(b, "endpoint");
        if (endpoint != NULL) {
                port = atoi(endpoint);
        }
@@ -129,8 +128,7 @@ NTSTATUS dcesrv_create_ncacn_ip_tcp_sockets(
        /* Set the port in the endpoint */
        snprintf(port_str, sizeof(port_str), "%u", port);
 
-       status = dcerpc_binding_set_string_option(
-               e->ep_description, "endpoint", port_str);
+       status = dcerpc_binding_set_string_option(b, "endpoint", port_str);
        if (!NT_STATUS_IS_OK(status)) {
                DBG_ERR("Failed to set binding endpoint '%s': %s\n",
                        port_str, nt_errstr(status));
index 6adb34baa20bd921d94bf9f6ef596fa16b4ebafb..0d673eb49598f505f2b63348a7a851642e95caf0 100644 (file)
@@ -28,7 +28,7 @@
 struct pf_listen_fd;
 
 NTSTATUS dcesrv_create_ncacn_ip_tcp_sockets(
-       struct dcesrv_endpoint *e,
+       struct dcerpc_binding *b,
        TALLOC_CTX *mem_ctx,
        size_t *pnum_fds,
        int **pfds);