summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_smb_traffic_analyzer.c
diff options
context:
space:
mode:
authorHolger Hetterich <hhetter@novell.com>2010-01-22 14:55:33 +0100
committerJim McDonough <jmcd@samba.org>2010-03-16 09:52:09 -0400
commit9702dcfa918f18c038eef0251b6330d6cf9a7162 (patch)
tree4a2ea89c245d30f621c997eacf1bbccb0850a927 /source3/modules/vfs_smb_traffic_analyzer.c
parent654cff4cc356ca9c403a57af19f319ec26da54ce (diff)
downloadsamba-9702dcfa918f18c038eef0251b6330d6cf9a7162.tar.gz
samba-9702dcfa918f18c038eef0251b6330d6cf9a7162.tar.bz2
samba-9702dcfa918f18c038eef0251b6330d6cf9a7162.zip
Fetch the SID of the user we are running as and send with the common
data.
Diffstat (limited to 'source3/modules/vfs_smb_traffic_analyzer.c')
-rw-r--r--source3/modules/vfs_smb_traffic_analyzer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index 5acfc2a9b0..581aa99ca7 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -73,7 +73,6 @@ struct rw_data {
size_t len;
};
-
static int vfs_smb_traffic_analyzer_debug_level = DBGC_VFS;
static enum sock_type smb_traffic_analyzer_connMode(vfs_handle_struct *handle)
@@ -212,6 +211,7 @@ static char *smb_traffic_analyzer_create_string( struct tm *tm, \
char *buf = NULL;
char *timestr = NULL;
char *opstr = NULL;
+ char *userSID = NULL;
/* first create the data that is transfered with any VFS op */
opstr = talloc_asprintf(talloc_tos(), "%i", vfs_operation);
@@ -219,6 +219,10 @@ static char *smb_traffic_analyzer_create_string( struct tm *tm, \
buf = talloc_asprintf(talloc_tos(), "%04u%s", len, opstr);
len = strlen( username );
buf = talloc_asprintf_append(buf, "%04u%s", len, username);
+ userSID = dom_sid_string( talloc_tos(),
+ &handle->conn->server_info->ptok->user_sids[0]);
+ len = strlen( userSID );
+ buf = talloc_asprintf_append(buf, "%04u%s", len, userSID);
len = strlen( handle->conn->connectpath );
buf = talloc_asprintf_append( buf, "%04u%s", len, \
handle->conn->connectpath );
@@ -316,7 +320,6 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
if (!username) {
return;
}
-
protocol_version = lp_parm_const_string(SNUM(handle->conn),
"smb_traffic_analyzer",
"protocol_version", NULL );