]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_server3: Remove dcerpc_ncacn_conn->remote_client_addr
authorVolker Lendecke <vl@samba.org>
Wed, 6 Oct 2021 09:16:21 +0000 (11:16 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 5 Jan 2022 00:11:38 +0000 (00:11 +0000)
This was only used inside rpc_worker_new_client(), a leftover from
times where accepting a client was an async process waiting for the
struct named_pipe_auth_req_info4.

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

index 056cb24c53dfd56bf81ff069a294c17b9b543b5e..9fdc3327abfcf8ac573a13f481f376e80a2c59a1 100644 (file)
@@ -41,7 +41,6 @@ struct dcerpc_ncacn_conn {
 
        struct dcesrv_endpoint *endpoint;
 
-       struct tsocket_address *remote_client_addr;
        char *remote_client_name;
        struct tsocket_address *local_server_addr;
        char *local_server_name;
index 9a547fcbdfe8710356d9f4e3a1cff855687d9d3c..6ba6f9790c4c22d0791e9f7c28d6f26f44a8e3eb 100644 (file)
@@ -171,6 +171,7 @@ static void rpc_worker_new_client(
 {
        struct dcesrv_context *dce_ctx = worker->dce_ctx;
        struct named_pipe_auth_req_info5 *info5 = client->npa_info5;
+       struct tsocket_address *remote_client_addr = NULL;
        struct dcerpc_binding *b = NULL;
        enum dcerpc_transport_t transport;
        struct dcesrv_endpoint *ep = NULL;
@@ -260,7 +261,7 @@ static void rpc_worker_new_client(
                ret = tsocket_address_unix_from_path(
                        ncacn_conn,
                        info5->remote_client_addr,
-                       &ncacn_conn->remote_client_addr);
+                       &remote_client_addr);
                if (ret == -1) {
                        DBG_DEBUG("tsocket_address_unix_from_path"
                                  "(%s) failed: %s\n",
@@ -302,7 +303,7 @@ static void rpc_worker_new_client(
                        "ip",
                        info5->remote_client_addr,
                        info5->remote_client_port,
-                       &ncacn_conn->remote_client_addr);
+                       &remote_client_addr);
                if (ret == -1) {
                        DBG_DEBUG("tsocket_address_inet_from_strings"
                                  "(%s, %"PRIu16") failed: %s\n",
@@ -423,7 +424,8 @@ static void rpc_worker_new_client(
 
        dcesrv_conn->stream = talloc_move(dcesrv_conn, &tstream);
        dcesrv_conn->local_address = ncacn_conn->local_server_addr;
-       dcesrv_conn->remote_address = ncacn_conn->remote_client_addr;
+       dcesrv_conn->remote_address =
+               talloc_move(dcesrv_conn, &remote_client_addr);
 
        if (client->bind_packet.length == 0) {
                DBG_DEBUG("Expected bind packet\n");