From: Jeremy Allison Date: Fri, 9 Aug 2019 23:14:14 +0000 (-0700) Subject: s3: VFS: vfs_time_audit. Remove rename_fn(). No longer used. X-Git-Tag: tdb-1.4.2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0ac39d56156257275048a55f101665e32905da9;p=thirdparty%2Fsamba.git s3: VFS: vfs_time_audit. Remove rename_fn(). No longer used. NB, this will now fail smb_vfs_assert_all_fns() until we remove the rename_fn() from the VFS definitions. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 31350df5e91..2a2a8eea584 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -896,26 +896,6 @@ static ssize_t smb_time_audit_recvfile(vfs_handle_struct *handle, int fromfd, return result; } -static int smb_time_audit_rename(vfs_handle_struct *handle, - const struct smb_filename *oldname, - const struct smb_filename *newname) -{ - int result; - struct timespec ts1,ts2; - double timediff; - - clock_gettime_mono(&ts1); - result = SMB_VFS_NEXT_RENAME(handle, oldname, newname); - clock_gettime_mono(&ts2); - timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9; - - if (timediff > audit_timeout) { - smb_time_audit_log_smb_fname("rename", timediff, newname); - } - - return result; -} - static int smb_time_audit_renameat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *oldname, @@ -2836,7 +2816,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = { .lseek_fn = smb_time_audit_lseek, .sendfile_fn = smb_time_audit_sendfile, .recvfile_fn = smb_time_audit_recvfile, - .rename_fn = smb_time_audit_rename, .renameat_fn = smb_time_audit_renameat, .fsync_send_fn = smb_time_audit_fsync_send, .fsync_recv_fn = smb_time_audit_fsync_recv,