summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorSamuel Cabrero <scabrero@samba.org>2021-04-13 12:07:52 +0200
committerSamuel Cabrero <scabrero@sn-devel-184>2021-04-19 12:28:30 +0000
commitee3ea1bc745e743d49571b6c4f8465e9b8e9fa09 (patch)
tree8807f0eb65480da06339cb24b295b8206b3885fd /source3/include
parent4cc06106998e49eaecf704a71ffb5e421ca67ab3 (diff)
downloadsamba-ee3ea1bc745e743d49571b6c4f8465e9b8e9fa09.tar.gz
VFS: Add SMB_VFS_FNTIMES
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smbprofile.h1
-rw-r--r--source3/include/vfs.h10
-rw-r--r--source3/include/vfs_macros.h5
3 files changed, 16 insertions, 0 deletions
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 1dc3a088655..79212022690 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -75,6 +75,7 @@ struct tevent_context;
SMBPROFILE_STATS_BASIC(syscall_chdir) \
SMBPROFILE_STATS_BASIC(syscall_getwd) \
SMBPROFILE_STATS_BASIC(syscall_ntimes) \
+ SMBPROFILE_STATS_BASIC(syscall_fntimes) \
SMBPROFILE_STATS_BASIC(syscall_ftruncate) \
SMBPROFILE_STATS_BASIC(syscall_fallocate) \
SMBPROFILE_STATS_BASIC(syscall_fcntl_lock) \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 7bbd5e189a8..d83c67c613f 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -347,6 +347,7 @@
* Version 45 - Remove SMB_VFS_REMOVEXATTR
* Version 45 - Remove SMB_VFS_GET_DOS_ATTRIBUTES()
* Version 45 - Remove SMB_VFS_CHMOD
+ * Version 45 - Add SMB_VFS_FNTIMES
*/
#define SMB_VFS_INTERFACE_VERSION 45
@@ -1019,6 +1020,9 @@ struct vfs_fn_pointers {
int (*ntimes_fn)(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
struct smb_file_time *ft);
+ int (*fntimes_fn)(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct smb_file_time *ft);
int (*ftruncate_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, off_t offset);
int (*fallocate_fn)(struct vfs_handle_struct *handle,
struct files_struct *fsp,
@@ -1531,6 +1535,9 @@ struct smb_filename *smb_vfs_call_getwd(struct vfs_handle_struct *handle,
int smb_vfs_call_ntimes(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
struct smb_file_time *ft);
+int smb_vfs_call_fntimes(struct vfs_handle_struct *handle,
+ struct files_struct *fsp,
+ struct smb_file_time *ft);
int smb_vfs_call_ftruncate(struct vfs_handle_struct *handle,
struct files_struct *fsp, off_t offset);
int smb_vfs_call_fallocate(struct vfs_handle_struct *handle,
@@ -1959,6 +1966,9 @@ struct smb_filename *vfs_not_implemented_getwd(vfs_handle_struct *handle,
int vfs_not_implemented_ntimes(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
struct smb_file_time *ft);
+int vfs_not_implemented_fntimes(vfs_handle_struct *handle,
+ files_struct *fsp,
+ struct smb_file_time *ft);
int vfs_not_implemented_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
off_t offset);
int vfs_not_implemented_fallocate(vfs_handle_struct *handle, files_struct *fsp,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 5247d56bfc9..eed6779bbaa 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -273,6 +273,11 @@
#define SMB_VFS_NEXT_NTIMES(handle, path, ts) \
smb_vfs_call_ntimes((handle)->next, (path), (ts))
+#define SMB_VFS_FNTIMES(fsp, ts) \
+ smb_vfs_call_fntimes((fsp)->conn->vfs_handles, (fsp), (ts))
+#define SMB_VFS_NEXT_FNTIMES(handle, fsp, ts) \
+ smb_vfs_call_fntimes((handle)->next, (fsp), (ts))
+
#define SMB_VFS_FTRUNCATE(fsp, offset) \
smb_vfs_call_ftruncate((fsp)->conn->vfs_handles, (fsp), (offset))
#define SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset) \