summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-06-16 14:20:21 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-07-04 18:28:32 +1000
commitc0f1c179b9ea1394b8273cbd12a84276585c3636 (patch)
tree586253c17cbbc71e695a81f557c7ccac0cb77141 /source3/modules
parent2f92ffb1a41731ef7bfc7a3f38d54c1bffba2f34 (diff)
downloadsamba-c0f1c179b9ea1394b8273cbd12a84276585c3636.tar.gz
samba-c0f1c179b9ea1394b8273cbd12a84276585c3636.tar.bz2
samba-c0f1c179b9ea1394b8273cbd12a84276585c3636.zip
s3-vfs: Replace client_id in smbta.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_smb_traffic_analyzer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index ddce7e7dc5..2ce8beb04f 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -28,6 +28,7 @@
#include "secrets.h"
#include "../librpc/gen_ndr/ndr_netlogon.h"
#include "auth.h"
+#include "../lib/tsocket/tsocket.h"
/* abstraction for the send_over_network function */
enum sock_type {INTERNET_SOCKET = 0, UNIX_DOMAIN_SOCKET};
@@ -302,6 +303,7 @@ static char *smb_traffic_analyzer_create_string( TALLOC_CTX *ctx,
char *timestr = NULL;
char *sidstr = NULL;
char *usersid = NULL;
+ char *raddr = NULL;
char *buf = NULL;
char *vfs_operation_str = NULL;
const char *service_name = lp_const_servicename(handle->conn->params->service);
@@ -340,7 +342,13 @@ static char *smb_traffic_analyzer_create_string( TALLOC_CTX *ctx,
common_data_count_str,
usersid,
handle);
-
+
+ raddr = tsocket_address_inet_addr_string(handle->conn->sconn->remote_address,
+ ctx);
+ if (raddr == NULL) {
+ return NULL;
+ }
+
/* time stamp */
timestr = talloc_asprintf( common_data_count_str, \
"%04d-%02d-%02d %02d:%02d:%02d.%03d", \
@@ -369,8 +377,8 @@ static char *smb_traffic_analyzer_create_string( TALLOC_CTX *ctx,
handle->conn->session_info->info3->base.domain.string,
(unsigned int) strlen(timestr),
timestr,
- (unsigned int) strlen(handle->conn->sconn->client_id.addr),
- handle->conn->sconn->client_id.addr);
+ (unsigned int) strlen(raddr),
+ raddr);
talloc_free(common_data_count_str);