vfs_smb_traffic_analyzer shall also transfer the clients IP address.
authorHolger Hetterich <hhetter@novell.com>
Sun, 13 Feb 2011 17:20:00 +0000 (18:20 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 19 Feb 2011 00:53:18 +0000 (01:53 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb 19 01:53:18 CET 2011 on sn-devel-104

source3/modules/vfs_smb_traffic_analyzer.c
source3/modules/vfs_smb_traffic_analyzer.h

index 6b41affb06a9e0b271bd10b98d9ff5c288459ba7..cf90960540e2852b84192d576032155cad75f02c 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "includes.h"
+#include "../smbd/globals.h"
 #include "../lib/crypto/crypto.h"
 #include "vfs_smb_traffic_analyzer.h"
 #include "../libcli/security/security.h"
@@ -313,6 +314,7 @@ static char *smb_traffic_analyzer_create_string( TALLOC_CTX *ctx,
         * 4.affected share
         * 5.domain
         * 6.timestamp
+        * 7.IP Addresss of client
         */
 
        /*
@@ -348,10 +350,9 @@ static char *smb_traffic_analyzer_create_string( TALLOC_CTX *ctx,
                tm->tm_sec, \
                (int)seconds);
        len = strlen( timestr );
-
        /* create the string of common data */
        buf = talloc_asprintf(ctx,
-               "%s%04u%s%04u%s%04u%s%04u%s%04u%s%04u%s",
+               "%s%04u%s%04u%s%04u%s%04u%s%04u%s%04u%s%04u%s",
                common_data_count_str,
                (unsigned int) strlen(vfs_operation_str),
                vfs_operation_str,
@@ -365,7 +366,9 @@ static char *smb_traffic_analyzer_create_string( TALLOC_CTX *ctx,
                strlen(handle->conn->server_info->info3->base.domain.string),
                handle->conn->server_info->info3->base.domain.string,
                (unsigned int) strlen(timestr),
-               timestr);
+               timestr,
+               (unsigned int) strlen(handle->conn->sconn->client_id.addr),
+               handle->conn->sconn->client_id.addr);
 
        talloc_free(common_data_count_str);
 
index 3f47ea5a72f5f2668ef9965f41fb608199ccd05c..bfc0614132d317b93c2f7db509b3caa4115b04d6 100644 (file)
@@ -85,7 +85,7 @@
  * so that if the receiver is using an older version of the protocol
  * it knows which blocks it can ignore.
  */
-#define SMBTA_COMMON_DATA_COUNT "00016"
+#define SMBTA_COMMON_DATA_COUNT "00017"
 
 /*
  * VFS Functions identifier table. In protocol version 2, every vfs