diff options
-rw-r--r-- | source3/include/smb.h | 2 | ||||
-rw-r--r-- | source3/smbd/connection.c | 2 | ||||
-rw-r--r-- | source3/smbd/service.c | 14 |
3 files changed, 3 insertions, 15 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 31ef910a70..ab1b4b2d9a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -522,8 +522,6 @@ typedef struct connection_struct { */ gid_t force_group_gid; - char client_address[INET6_ADDRSTRLEN]; /* String version of client IP address. */ - uint16 vuid; /* vuid of user who *opened* this connection, or UID_FIELD_INVALID */ time_t lastused; diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index f4f4fc217b..9b766d586e 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -147,7 +147,7 @@ bool claim_connection(connection_struct *conn, const char *name) crec.start = time(NULL); strlcpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine)); - strlcpy(crec.addr, conn->client_address, sizeof(crec.addr)); + strlcpy(crec.addr, conn->sconn->client_id.addr, sizeof(crec.addr)); dbuf.dptr = (uint8 *)&crec; dbuf.dsize = sizeof(crec); diff --git a/source3/smbd/service.c b/source3/smbd/service.c index c1b6d21dc5..d66a7a0e42 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -690,16 +690,6 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, add_session_user(sconn, conn->server_info->unix_name); - addr = tsocket_address_inet_addr_string(sconn->remote_address, - talloc_tos()); - if (addr == NULL) { - *pstatus = NT_STATUS_NO_MEMORY; - goto err_root_exit; - } - safe_strcpy(conn->client_address, addr, - sizeof(conn->client_address)-1); - TALLOC_FREE(addr); - conn->num_files_open = 0; conn->lastused = conn->lastused_count = time(NULL); conn->used = True; @@ -1060,7 +1050,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn, if( DEBUGLVL( IS_IPC(conn) ? 3 : 1 ) ) { dbgtext( "%s (%s) ", get_remote_machine_name(), - conn->client_address ); + conn->sconn->client_id.addr ); dbgtext( "%s", srv_is_signing_active(sconn) ? "signed " : ""); dbgtext( "connect to service %s ", lp_servicename(snum) ); dbgtext( "initially as user %s ", @@ -1245,7 +1235,7 @@ void close_cnum(connection_struct *conn, uint16 vuid) DEBUG(IS_IPC(conn)?3:1, ("%s (%s) closed connection to service %s\n", get_remote_machine_name(), - conn->client_address, + conn->sconn->client_id.addr, lp_servicename(SNUM(conn)))); /* Call VFS disconnect hook */ |