summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_full_audit.c
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-12-14 15:55:04 +0100
committerJeremy Allison <jra@samba.org>2020-12-17 18:56:29 +0000
commitcf07a5cd456c371dd0ff1b893cc6394299bd6920 (patch)
tree70c38c48f570c53627a4688760b6c09ee666eca7 /source3/modules/vfs_full_audit.c
parenta6f35e89d004405f80d0d8d8f7d0e6a67e14cd3d (diff)
downloadsamba-cf07a5cd456c371dd0ff1b893cc6394299bd6920.tar.gz
vfs_full_audit: support real dirfsps in smb_full_audit_mkdirat()
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules/vfs_full_audit.c')
-rw-r--r--source3/modules/vfs_full_audit.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 0350df868a5..5c601b2c66b 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -1051,8 +1051,17 @@ static int smb_full_audit_mkdirat(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode)
{
+ struct smb_filename *full_fname = NULL;
int result;
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ errno = ENOMEM;
+ return -1;
+ }
+
result = SMB_VFS_NEXT_MKDIRAT(handle,
dirfsp,
smb_fname,
@@ -1062,7 +1071,9 @@ static int smb_full_audit_mkdirat(vfs_handle_struct *handle,
(result >= 0),
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 result;
}