From: Ralph Boehme Date: Mon, 14 Dec 2020 14:55:04 +0000 (+0100) Subject: vfs_full_audit: support real dirfsps in smb_full_audit_mkdirat() X-Git-Tag: samba-4.14.0rc1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf07a5cd456c371dd0ff1b893cc6394299bd6920;p=thirdparty%2Fsamba.git vfs_full_audit: support real dirfsps in smb_full_audit_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- 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; }