s3: VFS: catia: Implement SMB_VFS_FNTIMES()
authorSamuel Cabrero <scabrero@samba.org>
Tue, 13 Apr 2021 14:53:18 +0000 (16:53 +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_catia.c

index 96843095f17c9defa9c9512b2a28aea86eb40119..1c69b622ee162e350fbe3f4012a9d2f3868ff625 100644 (file)
@@ -850,6 +850,25 @@ static int catia_ntimes(vfs_handle_struct *handle,
        return ret;
 }
 
+static int catia_fntimes(vfs_handle_struct *handle,
+                        files_struct *fsp,
+                        struct smb_file_time *ft)
+{
+       struct catia_cache *cc = NULL;
+       int ret;
+
+       ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
+       if (ret != 0) {
+               return ret;
+       }
+
+       ret = SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
+
+       CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
+
+       return ret;
+}
+
 static struct smb_filename *
 catia_realpath(vfs_handle_struct *handle,
                TALLOC_CTX *ctx,
@@ -2152,6 +2171,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .lchown_fn = catia_lchown,
        .chdir_fn = catia_chdir,
        .ntimes_fn = catia_ntimes,
+       .fntimes_fn = catia_fntimes,
        .ftruncate_fn = catia_ftruncate,
        .fallocate_fn = catia_fallocate,
        .lock_fn = catia_lock,