From: Jeremy Allison Date: Thu, 22 Aug 2019 21:53:25 +0000 (-0700) Subject: s3: VFS: vfs_time_audit. Remove readlink_fn(). No longer used. X-Git-Tag: tevent-0.10.1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5333ac35dde2b904ac520ac80eee54042c33b39f;p=thirdparty%2Fsamba.git s3: VFS: vfs_time_audit. Remove readlink_fn(). No longer used. 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 Reviewed-by: Ralph Böhme --- diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index b1eb0f979a2..b8e19267b5d 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -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,