[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3463-ga7a3f33
Jeremy Allison
jra at samba.org
Sat Feb 14 01:34:22 GMT 2009
The branch, v3-2-test has been updated
via a7a3f335e3b867ca6c8d75a53262b15d7c75d7b1 (commit)
via 4b17cca0557a086c5722c221a6e282bad4a2b40a (commit)
from 3ac4c42e1e5be2f25ef4602efa2ac360d8b603ce (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit a7a3f335e3b867ca6c8d75a53262b15d7c75d7b1
Author: Jeremy Allison <jra at samba.org>
Date: Fri Feb 13 17:33:24 2009 -0800
Oops. Fix the build (don't use 3.3 references in 3.2 :-).
Jeremy.
commit 4b17cca0557a086c5722c221a6e282bad4a2b40a
Author: Holger Hetterich <hhetter at novell.com>
Date: Fri Feb 13 17:30:22 2009 -0800
Enable total anonymization in vfs_smb_traffic_analyzer, by mapping
any user names to the one given by anonymize_prefix, without
generating a hash number. This setting is optional and is compatible
with the module configuration format of Samba 3.3.
-----------------------------------------------------------------------
Summary of changes:
docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml | 11 +++++++++++
source/modules/vfs_smb_traffic_analyzer.c | 19 +++++++++++++++----
2 files changed, 26 insertions(+), 4 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 a12f44b..beb4f85 100644
--- a/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
+++ b/docs-xml/manpages-3/vfs_smb_traffic_analyzer.8.xml
@@ -117,6 +117,17 @@
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>smb_traffic_analyzer:total_anonymization = STRING</term>
+ <listitem>
+ <para>If STRING matches to 'yes', the module will replace
+ any user name with the string given by the option
+ smb_traffic_analyzer:anonymize_prefix, without generating
+ an additional hash number. This means that any transfer data
+ will be mapped to a single user, leading to a total
+ anonymization of user related data.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
diff --git a/source/modules/vfs_smb_traffic_analyzer.c b/source/modules/vfs_smb_traffic_analyzer.c
index 10611cd..df2cce4 100644
--- a/source/modules/vfs_smb_traffic_analyzer.c
+++ b/source/modules/vfs_smb_traffic_analyzer.c
@@ -165,6 +165,7 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
char *str = NULL;
const char *username = NULL;
const char *anon_prefix = NULL;
+ const char *total_anonymization = NULL;
size_t len;
SMB_VFS_HANDLE_GET_DATA(handle, rf_sock, struct refcounted_sock, return);
@@ -185,13 +186,23 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
/* check if anonymization is required */
+ total_anonymization=lp_parm_const_string(SNUM(handle->conn),"smb_traffic_analyzer",
+ "total_anonymization", NULL);
+
anon_prefix=lp_parm_const_string(SNUM(handle->conn),"smb_traffic_analyzer",\
"anonymize_prefix", NULL );
if (anon_prefix!=NULL) {
- username = talloc_asprintf(talloc_tos(),
- "%s%i",
- anon_prefix,
- str_checksum(get_current_username()));
+ if (total_anonymization!=NULL) {
+ username = talloc_asprintf(talloc_tos(),
+ "%s",
+ anon_prefix);
+ } else {
+ username = talloc_asprintf(talloc_tos(),
+ "%s%i",
+ anon_prefix,
+ str_checksum(get_current_username()));
+ }
+
} else {
username = get_current_username();
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list