summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-16 09:39:29 +0200
committerVolker Lendecke <vl@samba.org>2010-08-18 11:18:23 +0200
commit6d10684556e9f9e847ec03dd8af057e8d4558e35 (patch)
tree30b3e7e04a3c43582a0053fa133f7e322b77b899 /source3
parent7b6835ec1da127713d0a412edcbe0a3c1bcc6192 (diff)
downloadsamba-6d10684556e9f9e847ec03dd8af057e8d4558e35.tar.gz
samba-6d10684556e9f9e847ec03dd8af057e8d4558e35.tar.bz2
samba-6d10684556e9f9e847ec03dd8af057e8d4558e35.zip
s3: Remove unneeded "client_address" from connection_struct
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/smbd/connection.c2
-rw-r--r--source3/smbd/service.c14
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 */