summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/modules/vfs_expand_msdfs.c2
-rw-r--r--source3/modules/vfs_smb_traffic_analyzer.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c
index 0d09d213e1..c22ab66e14 100644
--- a/source3/modules/vfs_expand_msdfs.c
+++ b/source3/modules/vfs_expand_msdfs.c
@@ -147,7 +147,7 @@ static char *expand_msdfs_target(TALLOC_CTX *ctx,
conn->connectpath,
conn->server_info->utok.gid,
conn->server_info->sanitized_username,
- pdb_get_domain(conn->server_info->sam_account),
+ pdb_get_domain(handle->conn->server_info->sam_account),
targethost);
DEBUG(10, ("Expanded targethost to %s\n", targethost));
diff --git a/source3/modules/vfs_smb_traffic_analyzer.c b/source3/modules/vfs_smb_traffic_analyzer.c
index cd843e6ad4..12c893fae7 100644
--- a/source3/modules/vfs_smb_traffic_analyzer.c
+++ b/source3/modules/vfs_smb_traffic_analyzer.c
@@ -27,8 +27,6 @@
/* Prototypes */
-extern userdom_struct current_user_info;
-
static int vfs_smb_traffic_analyzer_debug_level = DBGC_VFS;
/* create the timestamp in sqlite compatible format */
@@ -187,9 +185,9 @@ static void smb_traffic_analyzer_send_data(vfs_handle_struct *handle,
strlcpy(Sender, str, sizeof(Sender));
strlcat(Sender, ",\"", sizeof(Sender));
- strlcat(Sender, get_current_username(), sizeof(Sender));
+ strlcat(Sender, handle->conn->server_info->sanitized_username, sizeof(Sender));
strlcat(Sender, "\",\"", sizeof(Sender));
- strlcat(Sender, current_user_info.domain, sizeof(Sender));
+ strlcat(Sender, pdb_get_domain(handle->conn->server_info->sam_account), sizeof(Sender));
strlcat(Sender, "\",\"", sizeof(Sender));
if (Write)
strlcat(Sender, "W", sizeof(Sender));