1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

VFS: full_audit: Fixup smb_full_audit_symlinkat() to log the dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2021-01-25 12:02:48 -08:00 committed by Ralph Boehme
parent bc6aa4ed40
commit 50205189d8

View File

@ -1804,8 +1804,16 @@ static int smb_full_audit_symlinkat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *new_smb_fname)
{
struct smb_filename *full_fname = NULL;
int result;
full_fname = full_path_from_dirfsp_atname(talloc_tos(),
dirfsp,
new_smb_fname);
if (full_fname == NULL) {
return -1;
}
result = SMB_VFS_NEXT_SYMLINKAT(handle,
link_contents,
dirfsp,
@ -1816,7 +1824,9 @@ static int smb_full_audit_symlinkat(vfs_handle_struct *handle,
handle,
"%s|%s",
link_contents->base_name,
smb_fname_str_do_log(handle->conn, new_smb_fname));
smb_fname_str_do_log(handle->conn, full_fname));
TALLOC_FREE(full_fname);
return result;
}