s3: VFS: vfs_time_audit. Remove link_fn(). No longer used.
authorJeremy Allison <jra@samba.org>
Fri, 16 Aug 2019 23:29:11 +0000 (16:29 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 20 Aug 2019 21:09:29 +0000 (21:09 +0000)
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 <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/modules/vfs_time_audit.c

index 5342438eb3269a3c257553bac0075e1612f8811b..697a75f1d2f7af94b52785ec6f7f9a886eb08323 100644 (file)
@@ -1421,27 +1421,6 @@ static int smb_time_audit_readlink(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_time_audit_link(vfs_handle_struct *handle,
-                               const struct smb_filename *old_smb_fname,
-                               const struct smb_filename *new_smb_fname)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_LINK(handle, old_smb_fname, new_smb_fname);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("link", timediff,
-                       new_smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_linkat(vfs_handle_struct *handle,
                                files_struct *srcfsp,
                                const struct smb_filename *old_smb_fname,
@@ -2870,7 +2849,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .getlock_fn = smb_time_audit_getlock,
        .symlink_fn = smb_time_audit_symlink,
        .readlink_fn = smb_time_audit_readlink,
-       .link_fn = smb_time_audit_link,
        .linkat_fn = smb_time_audit_linkat,
        .mknod_fn = smb_time_audit_mknod,
        .realpath_fn = smb_time_audit_realpath,