]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/modules: VFS: time_audit: Remove smb_time_audit_chmod
authorNoel Power <noel.power@suse.com>
Thu, 8 Apr 2021 12:00:36 +0000 (13:00 +0100)
committerNoel Power <npower@samba.org>
Sun, 11 Apr 2021 22:27:34 +0000 (22:27 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_time_audit.c

index 212b2c76d9afccadc905298cf8710303640b6c6e..1a2b97a7001ef44cfc1baf3eb1b1afa8142322db 100644 (file)
@@ -1138,28 +1138,6 @@ static int smb_time_audit_unlinkat(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_time_audit_chmod(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("chmod",
-                       timediff,
-                       smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_fchmod(vfs_handle_struct *handle, files_struct *fsp,
                                 mode_t mode)
 {
@@ -2808,7 +2786,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .lstat_fn = smb_time_audit_lstat,
        .get_alloc_size_fn = smb_time_audit_get_alloc_size,
        .unlinkat_fn = smb_time_audit_unlinkat,
-       .chmod_fn = smb_time_audit_chmod,
        .fchmod_fn = smb_time_audit_fchmod,
        .fchown_fn = smb_time_audit_fchown,
        .lchown_fn = smb_time_audit_lchown,