s4-smbd: Remember the original client and server IPs from the SMB connection
authorAndrew Bartlett <abartlet@samba.org>
Sun, 19 Feb 2017 23:01:37 +0000 (12:01 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 29 Mar 2017 00:37:25 +0000 (02:37 +0200)
We need to know in the RPC server the original address the client came from
so that we can log this with the authentication audit information

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
source4/smbd/service_named_pipe.c

index b75a9faeb756843676352edf70e2676d95d7babb..02758b90ce17dda4c42b58e2c17ba770cdfb95a5 100644 (file)
@@ -119,6 +119,9 @@ static void named_pipe_accept_done(struct tevent_req *subreq)
                goto out;
        }
 
+       conn->local_address = talloc_move(conn, &server);
+       conn->remote_address = talloc_move(conn, &client);
+
        DEBUG(10, ("Accepted npa connection from %s. "
                   "Client: %s (%s). Server: %s (%s)\n",
                   tsocket_address_string(conn->remote_address, tmp_ctx),