From: Ralph Boehme Date: Mon, 14 Dec 2020 14:56:11 +0000 (+0100) Subject: vfs_time_audit: support real dirfsps in smb_time_audit_mkdirat() X-Git-Tag: samba-4.14.0rc1~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=621793733dc6f22b2c90ca236906c62127e93cb0;p=thirdparty%2Fsamba.git vfs_time_audit: support real dirfsps in smb_time_audit_mkdirat() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 1f7829fd292..91fef517ded 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -545,10 +545,19 @@ static int smb_time_audit_mkdirat(vfs_handle_struct *handle, const struct smb_filename *smb_fname, mode_t mode) { + struct smb_filename *full_fname = NULL; int result; struct timespec ts1,ts2; double timediff; + full_fname = full_path_from_dirfsp_atname(talloc_tos(), + dirfsp, + smb_fname); + if (full_fname == NULL) { + errno = ENOMEM; + return -1; + } + clock_gettime_mono(&ts1); result = SMB_VFS_NEXT_MKDIRAT(handle, dirfsp, @@ -560,9 +569,11 @@ static int smb_time_audit_mkdirat(vfs_handle_struct *handle, if (timediff > audit_timeout) { smb_time_audit_log_smb_fname("mkdirat", timediff, - smb_fname); + full_fname); } + TALLOC_FREE(full_fname); + return result; }