s3: VFS: vfs_time_audit: Remove chown_fn(). No longer used.
authorJeremy Allison <jra@samba.org>
Thu, 10 Oct 2019 21:29:30 +0000 (14:29 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 15 Oct 2019 18:46:38 +0000 (18:46 +0000)
NB, this will now fail smb_vfs_assert_all_fns()
until we remove the chown_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 871823f5c15771e4c23ac50b81bfbc7ee3b363d4..70efa30b91410ad3e419660eff1654a79e495b52 100644 (file)
@@ -1109,29 +1109,6 @@ static int smb_time_audit_fchmod(vfs_handle_struct *handle, files_struct *fsp,
        return result;
 }
 
-static int smb_time_audit_chown(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       uid_t uid,
-                       gid_t gid)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_CHOWN(handle, smb_fname, uid, gid);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("chown",
-                       timediff,
-                       smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_fchown(vfs_handle_struct *handle, files_struct *fsp,
                                 uid_t uid, gid_t gid)
 {
@@ -2859,7 +2836,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .unlinkat_fn = smb_time_audit_unlinkat,
        .chmod_fn = smb_time_audit_chmod,
        .fchmod_fn = smb_time_audit_fchmod,
-       .chown_fn = smb_time_audit_chown,
        .fchown_fn = smb_time_audit_fchown,
        .lchown_fn = smb_time_audit_lchown,
        .chdir_fn = smb_time_audit_chdir,