]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: full_audit: Log full pathname as smb_full_audit_create_dfs_pathat() isn...
authorJeremy Allison <jra@samba.org>
Wed, 17 Mar 2021 04:49:14 +0000 (21:49 -0700)
committerNoel Power <npower@samba.org>
Mon, 22 Mar 2021 18:37:34 +0000 (18:37 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power<npower@samba.org>
source3/modules/vfs_full_audit.c

index e89307ce6a101f132155dc25739963b651db0fb4..ee26c6a5bfa0c59cc19c3fd2c4b48f10f5c4719a 100644 (file)
@@ -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;
 }