}
}
+
/* Connect to an internet socket */
static int smb_traffic_analyzer_connect_inet_socket(vfs_handle_struct *handle,
struct tm *tm = NULL;
int seconds;
char *str = NULL;
+ char *username = NULL;
+ const char *anon_prefix = NULL;
size_t len;
SMB_VFS_HANDLE_GET_DATA(handle, rf_sock, struct refcounted_sock, return);
}
seconds=(float) (tv.tv_usec / 1000);
+ /* check if anonymization is required */
+
+ 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(
+ handle->conn->server_info->sanitized_username ) );
+ } else {
+ username = talloc_asprintf(talloc_tos(),
+ "%s",
+ handle->conn->server_info->sanitized_username);
+ }
+
+ if (!username) {
+ return;
+ }
+
str = talloc_asprintf(talloc_tos(),
"V1,%u,\"%s\",\"%s\",\"%c\",\"%s\",\"%s\","
"\"%04d-%02d-%02d %02d:%02d:%02d.%03d\"\n",
(unsigned int)result,
- handle->conn->server_info->sanitized_username,
+ username,
pdb_get_domain(handle->conn->server_info->sam_account),
Write ? 'W' : 'R',
handle->conn->connectpath,