[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed May 18 13:37:01 MDT 2011


The branch, master has been updated
       via  eb57d47 Make protocol version 2 the default protocol, and only run on version 1 if V1 is explcitly given as a module option.
      from  f19ab5d lib/util/charset: Remove unused strcasecmp_w and strncasecmp_w

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit eb57d4719fc41352080a514cb40a0aca54153d35
Author: Holger Hetterich <hhetter at novell.com>
Date:   Wed May 18 15:24:23 2011 +0200

    Make protocol version 2 the default protocol, and only run on version 1 if V1 is explcitly given as a module option.
    
    I haven't received a single line of feedback on protocol v1
    for at least 1 1/2 years, whereas protocol v2 has an active
    userbase and more people developing around it.
    
    This patch includes a manpage update, describing the new
    version handling, as well as documenting the recent changes
    making the module transfer the IP address of the client machine
    as submitted with
    464c69609aa7e582f484c1d357b7c6d3eb2bcbe3.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Wed May 18 21:36:44 CEST 2011 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml |   10 ++++++----
 source3/modules/vfs_smb_traffic_analyzer.c         |   11 +++++------
 2 files changed, 11 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
index 882ee6a..9450703 100644
--- a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
+++ b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
@@ -45,6 +45,8 @@
 	protocol, supporting only a small list of VFS operations, and had
 	several drawbacks. The protocol version 2 is a try to solve the
 	problems version 1 had while at the same time adding new features.
+	With the release of Samba 3.6.0, the module will run protocol version 2
+	by default.
 	</para>
 </refsect1>
 
@@ -77,6 +79,7 @@
 	<listitem><para><command>SHARE</command> - the name of the share on which the VFS operation occured</para></listitem>
 	<listitem><para><command>FILENAME</command> - the name of the file that was used by the VFS operation</para></listitem>
 	<listitem><para><command>TIMESTAMP</command> - a timestamp, formatted as "yyyy-mm-dd hh-mm-ss.ms" indicating when the VFS operation occured</para></listitem>
+	<listitem><para><command>IP</command> - The IP Address (v4 or v6) of the client machine that initiated the VFS operation.</para></listitem>
 	</itemizedlist>
 
 	</para>
@@ -224,9 +227,9 @@
 		<varlistentry>
 		<term>smb_traffic_analyzer:protocol_version = STRING</term>
 		<listitem>
-		<para>If STRING matches to V1 or is not given at all, the module
-		will use version 1 of the protocol. If STRING matches to "V2"
-		the module will use version 2 of the protocol.
+		<para>If STRING matches to V1, the module will use version 1 of the
+		protocol. If STRING is not given, the module will use version 2 of the
+		protocol, which is the default.
 		</para>
 		</listitem>
 		</varlistentry>
@@ -241,7 +244,6 @@
 	<smbconfsection name="[example_share]"/>
 	<smbconfoption name="path">/data/example</smbconfoption>
 	<smbconfoption name="vfs_objects">smb_traffic_analyzer</smbconfoption>
-	<smbconfoption name="smb_traffic_analyzer:protocol_version">V2</smbconfoption>
 	<smbconfoption name="smb_traffic_analyzer:host">examplehost</smbconfoption>
 	<smbconfoption name="smb_traffic_analyzer:port">3491</smbconfoption>
 	</programlisting>
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index d1340c3..4146d78 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -452,7 +452,7 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
 					"protocol_version", NULL );
 
 
-	if ( protocol_version == NULL || strcmp( protocol_version,"V1") == 0) {
+	if (protocol_version != NULL && strcmp(protocol_version,"V1") == 0) {
 
 		struct rw_data *s_data = (struct rw_data *) data;
 
@@ -489,7 +489,10 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
 		return;
 		}
 
-	} else if ( strcmp( protocol_version, "V2") == 0) {
+	} else {
+		/**
+		 * Protocol 2 is used by default.
+		 */
 
 		switch( vfs_operation ) {
 		case vfs_id_open: ;
@@ -557,10 +560,6 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
 			return;
 		}
 
-	} else {
-		DEBUG(1, ("smb_traffic_analyzer_send_data_socket: "
-			"error, unknown protocol given!\n"));
-		return;
 	}
 
 	if (!str) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list