]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_time_audit. Remove readlink_fn(). No longer used.
authorJeremy Allison <jra@samba.org>
Thu, 22 Aug 2019 21:53:25 +0000 (14:53 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 23 Aug 2019 18:49:37 +0000 (18:49 +0000)
NB, this will now fail smb_vfs_assert_all_fns()
until we remove the mknod_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 b1eb0f979a29a66072f7838e0c486e29dd73745b..b8e19267b5d9a98e30f24e3d26f0f9b1e6bafdd4 100644 (file)
@@ -1398,29 +1398,6 @@ static int smb_time_audit_symlink(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_time_audit_readlink(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               char *buf,
-                               size_t bufsiz)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_READLINK(handle, smb_fname,
-                               buf, bufsiz);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("readlink", timediff,
-                               smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_readlinkat(vfs_handle_struct *handle,
                                files_struct *dirfsp,
                                const struct smb_filename *smb_fname,
@@ -2879,7 +2856,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .linux_setlease_fn = smb_time_audit_linux_setlease,
        .getlock_fn = smb_time_audit_getlock,
        .symlink_fn = smb_time_audit_symlink,
-       .readlink_fn = smb_time_audit_readlink,
        .readlinkat_fn = smb_time_audit_readlinkat,
        .linkat_fn = smb_time_audit_linkat,
        .mknodat_fn = smb_time_audit_mknodat,