From: Jeremy Allison Date: Wed, 17 Mar 2021 04:49:14 +0000 (-0700) Subject: s3: VFS: full_audit: Log full pathname as smb_full_audit_create_dfs_pathat() isn... X-Git-Tag: tevent-0.11.0~1437 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49bcb913398492f08a3d6d9b1ac36ff0563f71d7;p=thirdparty%2Fsamba.git s3: VFS: full_audit: Log full pathname as smb_full_audit_create_dfs_pathat() isn't restricted to dirfsp->conn->cwd_fsp anymore. Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index e89307ce6a1..ee26c6a5bfa 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -895,6 +895,14 @@ static NTSTATUS smb_full_audit_create_dfs_pathat(struct vfs_handle_struct *handl size_t referral_count) { NTSTATUS status; + struct smb_filename *full_fname = NULL; + + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + return NT_STATUS_NO_MEMORY; + } status = SMB_VFS_NEXT_CREATE_DFS_PATHAT(handle, dirfsp, @@ -906,8 +914,9 @@ static NTSTATUS smb_full_audit_create_dfs_pathat(struct vfs_handle_struct *handl NT_STATUS_IS_OK(status), handle, "%s", - smb_fname_str_do_log(handle->conn, smb_fname)); + smb_fname_str_do_log(handle->conn, full_fname)); + TALLOC_FREE(full_fname); return status; }