return result;
}
-
static int smb_time_audit_mknod(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode,
return result;
}
+static int smb_time_audit_mknodat(vfs_handle_struct *handle,
+ files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ mode_t mode,
+ SMB_DEV_T dev)
+{
+ int result;
+ struct timespec ts1,ts2;
+ double timediff;
+
+ clock_gettime_mono(&ts1);
+ result = SMB_VFS_NEXT_MKNODAT(handle,
+ dirfsp,
+ smb_fname,
+ mode,
+ dev);
+ clock_gettime_mono(&ts2);
+ timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
+
+ if (timediff > audit_timeout) {
+ smb_time_audit_log_smb_fname("mknodat", timediff, smb_fname);
+ }
+
+ return result;
+}
+
static struct smb_filename *smb_time_audit_realpath(vfs_handle_struct *handle,
TALLOC_CTX *ctx,
const struct smb_filename *smb_fname)
.readlink_fn = smb_time_audit_readlink,
.linkat_fn = smb_time_audit_linkat,
.mknod_fn = smb_time_audit_mknod,
+ .mknodat_fn = smb_time_audit_mknodat,
.realpath_fn = smb_time_audit_realpath,
.chflags_fn = smb_time_audit_chflags,
.file_id_create_fn = smb_time_audit_file_id_create,