diff options
author | Ralph Boehme <slow@samba.org> | 2020-12-14 15:39:37 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-12-17 18:56:29 +0000 |
commit | 6c79c2f2e829f5a11687785f5761675f25d93f7f (patch) | |
tree | 79d6ce10fa0cfd598e8c2f18b825991adc7f128b /source3/modules | |
parent | dc4c952807fd80993c6aaa9b1cd5a2918c5b0618 (diff) | |
download | samba-6c79c2f2e829f5a11687785f5761675f25d93f7f.tar.gz |
vfs_extd_audit: support real dirfsps in audit_mkdirat()
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_extd_audit.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c index 9b231d76ed9..daf88672862 100644 --- a/source3/modules/vfs_extd_audit.c +++ b/source3/modules/vfs_extd_audit.c @@ -192,8 +192,17 @@ static int 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, @@ -201,15 +210,16 @@ static int audit_mkdirat(vfs_handle_struct *handle, if (lp_syslog() > 0) { syslog(audit_syslog_priority(handle), "mkdirat %s %s%s\n", - smb_fname->base_name, + full_fname->base_name, (result < 0) ? "failed: " : "", (result < 0) ? strerror(errno) : ""); } DEBUG(0, ("vfs_extd_audit: mkdirat %s %s %s\n", - smb_fname->base_name, + full_fname->base_name, (result < 0) ? "failed: " : "", (result < 0) ? strerror(errno) : "")); + TALLOC_FREE(full_fname); return result; } |