]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: full_audit: Remove SMB_VFS_NTIMES()
authorSamuel Cabrero <scabrero@samba.org>
Tue, 13 Apr 2021 15:20:35 +0000 (17:20 +0200)
committerSamuel Cabrero <scabrero@sn-devel-184>
Mon, 19 Apr 2021 12:28:30 +0000 (12:28 +0000)
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_full_audit.c

index 04e59f0f01818258c7c3db8a379623393a95b602..060fecfba40200a576b7c03db5e09462925540a5 100644 (file)
@@ -1646,51 +1646,6 @@ static struct smb_filename *smb_full_audit_getwd(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_full_audit_ntimes(vfs_handle_struct *handle,
-                                const struct smb_filename *smb_fname,
-                                struct smb_file_time *ft)
-{
-       int result;
-       time_t create_time = convert_timespec_to_time_t(ft->create_time);
-       time_t atime = convert_timespec_to_time_t(ft->atime);
-       time_t mtime = convert_timespec_to_time_t(ft->mtime);
-       time_t ctime = convert_timespec_to_time_t(ft->ctime);
-       const char *create_time_str = "";
-       const char *atime_str = "";
-       const char *mtime_str = "";
-       const char *ctime_str = "";
-       TALLOC_CTX *frame = talloc_stackframe();
-
-       result = SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
-
-       if (create_time > 0) {
-               create_time_str = timestring(frame, create_time);
-       }
-       if (atime > 0) {
-               atime_str = timestring(frame, atime);
-       }
-       if (mtime > 0) {
-               mtime_str = timestring(frame, mtime);
-       }
-       if (ctime > 0) {
-               ctime_str = timestring(frame, ctime);
-       }
-
-       do_log(SMB_VFS_OP_NTIMES,
-              (result >= 0),
-              handle,
-              "%s|%s|%s|%s|%s",
-              smb_fname_str_do_log(handle->conn, smb_fname),
-              create_time_str,
-              atime_str,
-              mtime_str,
-              ctime_str);
-
-       TALLOC_FREE(frame);
-
-       return result;
-}
-
 static int smb_full_audit_fntimes(vfs_handle_struct *handle,
                                  files_struct *fsp,
                                  struct smb_file_time *ft)
@@ -3001,7 +2956,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .lchown_fn = smb_full_audit_lchown,
        .chdir_fn = smb_full_audit_chdir,
        .getwd_fn = smb_full_audit_getwd,
-       .ntimes_fn = smb_full_audit_ntimes,
        .fntimes_fn = smb_full_audit_fntimes,
        .ftruncate_fn = smb_full_audit_ftruncate,
        .fallocate_fn = smb_full_audit_fallocate,