s3: VFS: time_audit: Remove SMB_VFS_NTIMES()
authorSamuel Cabrero <scabrero@samba.org>
Tue, 13 Apr 2021 15:45:12 +0000 (17:45 +0200)
committerSamuel Cabrero <scabrero@sn-devel-184>
Mon, 19 Apr 2021 12:28:30 +0000 (12:28 +0000)
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_time_audit.c

index 150466ae186073672a2ea0edccdcaa24fad5d6c0..5b08ce9493525e4e3b3fd84346f256cb7b18b096 100644 (file)
@@ -1239,26 +1239,6 @@ static struct smb_filename *smb_time_audit_getwd(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_time_audit_ntimes(vfs_handle_struct *handle,
-                                const struct smb_filename *path,
-                                struct smb_file_time *ft)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_NTIMES(handle, path, ft);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_smb_fname("ntimes", timediff, path);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_fntimes(vfs_handle_struct *handle,
                                  files_struct *fsp,
                                  struct smb_file_time *ft)
@@ -2811,7 +2791,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .lchown_fn = smb_time_audit_lchown,
        .chdir_fn = smb_time_audit_chdir,
        .getwd_fn = smb_time_audit_getwd,
-       .ntimes_fn = smb_time_audit_ntimes,
        .fntimes_fn = smb_time_audit_fntimes,
        .ftruncate_fn = smb_time_audit_ftruncate,
        .fallocate_fn = smb_time_audit_fallocate,