mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
VFS: time_audit: Fixup smb_time_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:
parent
1ede5601a3
commit
4e9bb2d760
@ -1424,10 +1424,19 @@ static int smb_time_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;
|
||||
struct timespec ts1,ts2;
|
||||
double timediff;
|
||||
|
||||
full_fname = full_path_from_dirfsp_atname(talloc_tos(),
|
||||
dirfsp,
|
||||
new_smb_fname);
|
||||
if (full_fname == NULL) {
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
clock_gettime_mono(&ts1);
|
||||
result = SMB_VFS_NEXT_SYMLINKAT(handle,
|
||||
link_contents,
|
||||
@ -1438,9 +1447,10 @@ static int smb_time_audit_symlinkat(vfs_handle_struct *handle,
|
||||
|
||||
if (timediff > audit_timeout) {
|
||||
smb_time_audit_log_fname("symlinkat", timediff,
|
||||
new_smb_fname->base_name);
|
||||
full_fname->base_name);
|
||||
}
|
||||
|
||||
TALLOC_FREE(full_fname);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user