[SCM] Samba Shared Repository - branch master updated

Samuel Cabrero scabrero at samba.org
Mon Apr 19 13:20:01 UTC 2021


The branch, master has been updated
       via  aa2ab7feb10 s3: VFS: Remove SMB_VFS_NTIMES(), no longer used
       via  34f5594f2e3 s3: VFS: default: Remove SMB_VFS_NTIMES()
       via  adb952f01c0 s3: VFS: unityed_media: Remove SMB_VFS_NTIMES()
       via  b60693cbd79 s3: VFS: time_audit: Remove SMB_VFS_NTIMES()
       via  f2d1eb3870a s3: VFS: snapper: Remove SMB_VFS_NTIMES()
       via  395c3922c24 s3: VFS: shadow_copy2: Remove SMB_VFS_NTIMES()
       via  0b9ead076e5 s3: VFS: not_implemented: Remove SMB_VFS_NTIMES()
       via  bec491dd651 s3: VFS: media_harmony: Remove SMB_VFS_NTIMES()
       via  bc4bef5e6a4 gpfswrap: Remove wrapper for gpfs_set_times_path()
       via  fad792aa5ca s3: VFS: gpfs: Remove SMB_VFS_NTIMES()
       via  bd01e5a4556 s3: VFS: glusterfs: Remove SMB_VFS_NTIMES()
       via  7c70be05048 s3: VFS: full_audit: Remove SMB_VFS_NTIMES()
       via  23c27b7f822 s3: VFS: fruit: Remove SMB_VFS_NTIMES()
       via  059b565abab s3: VFS: delay_inject: Remove SMB_VFS_NTIMES()
       via  248151bac65 s3: VFS: ceph_snapshots: Remove SMB_VFS_NTIMES()
       via  0456cad10cc s3: VFS: ceph: Remove SMB_VFS_NTIMES()
       via  2e3608b040d s3: VFS: catia: Remove SMB_VFS_NTIMES()
       via  17a7f2cadb6 s3: VFS: cap: Remove SMB_VFS_NTIMES()
       via  ae9044395f5 s3: torture: Change cmd_utime to use SMB_VFS_FNTIMES()
       via  1e677da50b4 s3: VFS: recycle: set the recycled file times using SMB_VFS_FNTIMES()
       via  0a13237db9c s3: smbd: Use SMB_VFS_FNTIMES() instead of SMB_VFS_NTIMES()
       via  11969032310 s3: smbd: Pass full fsp to file_ntimes()
       via  bccbc5bb1ec s3: smbd: Update file times right before closing the underlying fd
       via  ed287c35d7a s3: smbd: Use new debug macros
       via  c942e2bd399 s3: VFS: snapper: Implement SMB_VFS_FNTIMES()
       via  6d9fc8de56b s3: VFS: shadow_copy2: Implement VFS_SMB_FNTIMES()
       via  02d624c46f2 s3: VFS: gpfs: Implement SMB_VFS_FNTIMES()
       via  28174fc1e7c gpfswrap: Add wrapper for gpfs_set_times()
       via  7125279a1e0 s3: VFS: glusterfs: Implement SMB_VFS_FNTIMES()
       via  5d84ad711a3 s3: VFS: fruit: Implement SMB_VFS_FNTIMES()
       via  5e0def5e320 s3: VFS: delay_inject: Implement SMB_VFS_FNTIMES()
       via  31091cc5382 s3: VFS: ceph_snapshots: Implement SMB_VFS_FNTIMES()
       via  f07f3a5c22c s3: VFS: ceph: Implement SMB_VFS_FNTIMES()
       via  c7712ec0e61 s3: VFS: catia: Implement SMB_VFS_FNTIMES()
       via  ee3ea1bc745 VFS: Add SMB_VFS_FNTIMES
       via  4cc06106998 build: Do not check for unused functions futimes() and futimens()
       via  564e066024d s3: VFS: default: ntimes profile not ended when times not changed
      from  fbf95a641bb auth4: Remove unused auth_unix

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit aa2ab7feb10f7c8bc0d84e3dabb484f728f6f3ba
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 18:00:29 2021 +0200

    s3: VFS: Remove SMB_VFS_NTIMES(), no longer used
    
                             ---------------
                            /               \
                           /      REST       \
                          /        IN         \
                         /        PEACE        \
                        /                       \
                        |                       |
                        |     SMB_VFS_NTIMES    |
                        |                       |
                        |                       |
                        |       13 April        |
                        |         2021          |
                        |                       |
                        |                       |
                       *|     *  *  *           | *
              _________)/\\_//(\/(/\)/\//\/\////|_)_______
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Samuel Cabrero <scabrero at samba.org>
    Autobuild-Date(master): Mon Apr 19 13:19:35 UTC 2021 on sn-devel-184

commit 34f5594f2e3cbf76fb88e6d5210a66a542e59f1b
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:18:20 2021 +0200

    s3: VFS: default: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit adb952f01c04e097279b52532ec917517d9fb727
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:45:51 2021 +0200

    s3: VFS: unityed_media: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit b60693cbd79ee393c7aa6b2d79e7aada27abdd06
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:45:12 2021 +0200

    s3: VFS: time_audit: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit f2d1eb3870ab35f20ab29d899370e55a149da2ca
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:42:56 2021 +0200

    s3: VFS: snapper: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 395c3922c24048899ab0aa042108592a6210b213
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:27:41 2021 +0200

    s3: VFS: shadow_copy2: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0b9ead076e54e0574b7fa312be596edde1537e60
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:27:08 2021 +0200

    s3: VFS: not_implemented: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bec491dd6513180c4f811308cb948511e7838569
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:26:29 2021 +0200

    s3: VFS: media_harmony: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bc4bef5e6a4f30d7386bb03c6d944fa0463c7934
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:25:39 2021 +0200

    gpfswrap: Remove wrapper for gpfs_set_times_path()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit fad792aa5ca5a660a591a799154e5f5e9c0f4021
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:23:49 2021 +0200

    s3: VFS: gpfs: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bd01e5a4556862e3536c3536a89053f63e0eca72
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:21:15 2021 +0200

    s3: VFS: glusterfs: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7c70be050480f791a2453a3be9625d44fd106b5e
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:20:35 2021 +0200

    s3: VFS: full_audit: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 23c27b7f8225bc824160b63c161b118a4511c068
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:19:50 2021 +0200

    s3: VFS: fruit: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 059b565abab86b49f439d08669e1ee53c08b7d27
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:19:01 2021 +0200

    s3: VFS: delay_inject: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 248151bac65525c2c5ee6451308762fed0037104
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:17:35 2021 +0200

    s3: VFS: ceph_snapshots: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0456cad10cc752e92e99b9226250ef05d27be3be
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:17:00 2021 +0200

    s3: VFS: ceph: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 2e3608b040d60789ecc16139e72135af1c70efe1
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:16:02 2021 +0200

    s3: VFS: catia: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 17a7f2cadb66d0fbf2db3d37927a92ee37a04ce7
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:15:12 2021 +0200

    s3: VFS: cap: Remove SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ae9044395f5a8e3ff42f86ed63152bb1a8a30d4d
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Wed Apr 14 14:21:41 2021 +0200

    s3: torture: Change cmd_utime to use SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 1e677da50b49838c801d2e4ddc02fc3735de6a5c
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Wed Apr 14 11:26:38 2021 +0200

    s3: VFS: recycle: set the recycled file times using SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0a13237db9c691e125e74b309b7d8c1e3bc6bd6e
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:13:39 2021 +0200

    s3: smbd: Use SMB_VFS_FNTIMES() instead of SMB_VFS_NTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 1196903231013efa6499e71703fa12f7031f0dcd
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:05:57 2021 +0200

    s3: smbd: Pass full fsp to file_ntimes()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bccbc5bb1ec897a77f1a782bc8db8c4a47a7cf8e
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Thu Apr 15 11:53:13 2021 +0200

    s3: smbd: Update file times right before closing the underlying fd
    
    Next commits will update file_ntimes() to use handle-based SMB_VFS_FNTIMES().
    Move the update_write_time_on_close() call immediately before closing the fd.
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ed287c35d7a25fbabc6e573dfeaa95db39dcad7c
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 17:03:33 2021 +0200

    s3: smbd: Use new debug macros
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit c942e2bd399a23d9f2328aa6f9b758968db59d22
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 13:39:09 2021 +0200

    s3: VFS: snapper: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 6d9fc8de56b883c868881237937be7ad2823216e
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 13:48:36 2021 +0200

    s3: VFS: shadow_copy2: Implement VFS_SMB_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 02d624c46f20c3685431cb746fb711fcf30b6b87
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 14:40:24 2021 +0200

    s3: VFS: gpfs: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 28174fc1e7cd9861df710a55c180635f616178f0
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 14:38:08 2021 +0200

    gpfswrap: Add wrapper for gpfs_set_times()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7125279a1e0f97ea9a9a7232720fa5b6b4a6b04a
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 16:07:13 2021 +0200

    s3: VFS: glusterfs: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5d84ad711a38a90587d033f5bad1943831bdcb82
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 16:23:41 2021 +0200

    s3: VFS: fruit: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5e0def5e320738948ac4d24c1a6d84ff59d874ea
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 16:25:12 2021 +0200

    s3: VFS: delay_inject: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 31091cc5382b2e5cfaafcf8010c754d3057b88c0
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 16:28:34 2021 +0200

    s3: VFS: ceph_snapshots: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit f07f3a5c22cda5132446e377e97db13349c942e4
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 16:49:25 2021 +0200

    s3: VFS: ceph: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit c7712ec0e61d3fffc56a938ad72d125906af01d2
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 16:53:18 2021 +0200

    s3: VFS: catia: Implement SMB_VFS_FNTIMES()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ee3ea1bc745e743d49571b6c4f8465e9b8e9fa09
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 12:07:52 2021 +0200

    VFS: Add SMB_VFS_FNTIMES
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 4cc06106998e49eaecf704a71ffb5e421ca67ab3
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 12:33:16 2021 +0200

    build: Do not check for unused functions futimes() and futimens()
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 564e066024deafebfe9cd7fbaa2478510b874a9b
Author: Samuel Cabrero <scabrero at samba.org>
Date:   Tue Apr 13 13:00:51 2021 +0200

    s3: VFS: default: ntimes profile not ended when times not changed
    
    Signed-off-by: Samuel Cabrero <scabrero at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 examples/VFS/skel_opaque.c                         |  8 +-
 examples/VFS/skel_transparent.c                    | 10 +--
 lib/util/gpfswrap.c                                | 12 ++-
 lib/util/gpfswrap.h                                |  3 +-
 source3/include/smbprofile.h                       |  2 +-
 source3/include/vfs.h                              | 14 +++-
 source3/include/vfs_macros.h                       |  8 +-
 source3/modules/The_New_VFS.org                    |  4 +-
 source3/modules/The_New_VFS.txt                    |  4 +-
 source3/modules/vfs_cap.c                          | 31 -------
 source3/modules/vfs_catia.c                        | 34 +++-----
 source3/modules/vfs_ceph.c                         | 35 ++++++--
 source3/modules/vfs_ceph_snapshots.c               | 16 ++--
 source3/modules/vfs_default.c                      | 95 +++++++++++-----------
 source3/modules/vfs_delay_inject.c                 | 12 +--
 source3/modules/vfs_fruit.c                        | 22 ++---
 source3/modules/vfs_full_audit.c                   | 21 +++--
 source3/modules/vfs_glusterfs.c                    | 36 ++++----
 source3/modules/vfs_gpfs.c                         | 72 ++++++++--------
 source3/modules/vfs_media_harmony.c                | 38 ---------
 source3/modules/vfs_not_implemented.c              |  8 +-
 source3/modules/vfs_recycle.c                      | 23 ++++--
 source3/modules/vfs_shadow_copy2.c                 | 18 ++--
 source3/modules/vfs_snapper.c                      | 20 +++--
 source3/modules/vfs_time_audit.c                   | 14 ++--
 source3/modules/vfs_unityed_media.c                | 27 ------
 .../script/tests/test_durable_handle_reconnect.sh  |  2 +-
 source3/smbd/close.c                               | 27 +++---
 source3/smbd/dosmode.c                             | 27 +++---
 source3/smbd/durable.c                             |  2 +-
 source3/smbd/proto.h                               |  3 +-
 source3/smbd/trans2.c                              |  2 +-
 source3/smbd/vfs.c                                 | 10 +--
 source3/torture/cmd_vfs.c                          |  2 +-
 source3/wscript                                    |  3 +-
 35 files changed, 304 insertions(+), 361 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index d0b14aaaae7..56d2e42d160 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -399,9 +399,9 @@ static struct smb_filename *skel_getwd(vfs_handle_struct *handle,
 	return NULL;
 }
 
-static int skel_ntimes(vfs_handle_struct *handle,
-		       const struct smb_filename *smb_fname,
-		       struct smb_file_time *ft)
+static int skel_fntimes(vfs_handle_struct *handle,
+			files_struct *fsp,
+			struct smb_file_time *ft)
 {
 	errno = ENOSYS;
 	return -1;
@@ -1034,7 +1034,7 @@ static struct vfs_fn_pointers skel_opaque_fns = {
 	.lchown_fn = skel_lchown,
 	.chdir_fn = skel_chdir,
 	.getwd_fn = skel_getwd,
-	.ntimes_fn = skel_ntimes,
+	.fntimes_fn = skel_fntimes,
 	.ftruncate_fn = skel_ftruncate,
 	.fallocate_fn = skel_fallocate,
 	.lock_fn = skel_lock,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index c73e04fd58b..c5bcc5314d8 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -523,11 +523,11 @@ static struct smb_filename *skel_getwd(vfs_handle_struct *handle,
 	return SMB_VFS_NEXT_GETWD(handle, ctx);
 }
 
-static int skel_ntimes(vfs_handle_struct *handle,
-		       const struct smb_filename *smb_fname,
-		       struct smb_file_time *ft)
+static int skel_fntimes(vfs_handle_struct *handle,
+			files_struct *fsp,
+			struct smb_file_time *ft)
 {
-	return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
+	return SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
 }
 
 static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp,
@@ -1340,7 +1340,7 @@ static struct vfs_fn_pointers skel_transparent_fns = {
 	.lchown_fn = skel_lchown,
 	.chdir_fn = skel_chdir,
 	.getwd_fn = skel_getwd,
-	.ntimes_fn = skel_ntimes,
+	.fntimes_fn = skel_fntimes,
 	.ftruncate_fn = skel_ftruncate,
 	.fallocate_fn = skel_fallocate,
 	.lock_fn = skel_lock,
diff --git a/lib/util/gpfswrap.c b/lib/util/gpfswrap.c
index 14118cbf53c..c348ed7c5b8 100644
--- a/lib/util/gpfswrap.c
+++ b/lib/util/gpfswrap.c
@@ -38,8 +38,7 @@ static int (*gpfs_get_winattrs_path_fn)(const char *pathname,
 static int (*gpfs_get_winattrs_fn)(int fd, struct gpfs_winattr *attrs);
 static int (*gpfs_ftruncate_fn)(int fd, gpfs_off64_t length);
 static int (*gpfs_lib_init_fn)(int flags);
-static int (*gpfs_set_times_path_fn)(char *pathname, int flags,
-				     gpfs_timestruc_t times[4]);
+static int (*gpfs_set_times_fn)(int fd, int flags, gpfs_timestruc_t times[4]);
 static int (*gpfs_quotactl_fn)(const char *pathname,
 			       int cmd,
 			       int id,
@@ -77,7 +76,7 @@ int gpfswrap_init(void)
 	gpfs_get_winattrs_fn	      = dlsym(l, "gpfs_get_winattrs");
 	gpfs_ftruncate_fn	      = dlsym(l, "gpfs_ftruncate");
 	gpfs_lib_init_fn	      = dlsym(l, "gpfs_lib_init");
-	gpfs_set_times_path_fn	      = dlsym(l, "gpfs_set_times_path");
+	gpfs_set_times_fn	      = dlsym(l, "gpfs_set_times");
 	gpfs_quotactl_fn	      = dlsym(l, "gpfs_quotactl");
 	gpfs_init_trace_fn	      = dlsym(l, "gpfs_init_trace");
 	gpfs_query_trace_fn	      = dlsym(l, "gpfs_query_trace");
@@ -204,15 +203,14 @@ int gpfswrap_lib_init(int flags)
 	return gpfs_lib_init_fn(flags);
 }
 
-int gpfswrap_set_times_path(char *pathname, int flags,
-			    gpfs_timestruc_t times[4])
+int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4])
 {
-	if (gpfs_set_times_path_fn == NULL) {
+	if (gpfs_set_times_fn == NULL) {
 		errno = ENOSYS;
 		return -1;
 	}
 
-	return gpfs_set_times_path_fn(pathname, flags, times);
+	return gpfs_set_times_fn(fd, flags, times);
 }
 
 int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp)
diff --git a/lib/util/gpfswrap.h b/lib/util/gpfswrap.h
index f62d690ac06..138e6ec696e 100644
--- a/lib/util/gpfswrap.h
+++ b/lib/util/gpfswrap.h
@@ -43,8 +43,7 @@ int gpfswrap_get_winattrs_path(const char *pathname,
 int gpfswrap_get_winattrs(int fd, struct gpfs_winattr *attrs);
 int gpfswrap_ftruncate(int fd, gpfs_off64_t length);
 int gpfswrap_lib_init(int flags);
-int gpfswrap_set_times_path(char *pathname, int flags,
-			    gpfs_timestruc_t times[4]);
+int gpfswrap_set_times(int fd, int flags, gpfs_timestruc_t times[4]);
 int gpfswrap_quotactl(const char *pathname, int cmd, int id, void *bufp);
 int gpfswrap_init_trace(void);
 int gpfswrap_query_trace(void);
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 1dc3a088655..1bb429778c4 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -74,7 +74,7 @@ struct tevent_context;
 	SMBPROFILE_STATS_BASIC(syscall_lchown) \
 	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..eaa816d8bec 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -347,6 +347,8 @@
  * 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
+ * Version 45 - Remove SMB_VFS_NTIMES
  */
 
 #define SMB_VFS_INTERFACE_VERSION 45
@@ -1016,9 +1018,9 @@ struct vfs_fn_pointers {
 			 const struct smb_filename *smb_fname);
 	struct smb_filename *(*getwd_fn)(struct vfs_handle_struct *handle,
 				TALLOC_CTX *mem_ctx);
-	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 +1533,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 +1964,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..40ff68aedab 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -268,10 +268,10 @@
 #define SMB_VFS_NEXT_GETWD(handle, ctx) \
 	smb_vfs_call_getwd((handle)->next, (ctx))
 
-#define SMB_VFS_NTIMES(conn, path, ts) \
-	smb_vfs_call_ntimes((conn)->vfs_handles, (path), (ts))
-#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))
diff --git a/source3/modules/The_New_VFS.org b/source3/modules/The_New_VFS.org
index 5dc899befb6..19dd46f9fe1 100644
--- a/source3/modules/The_New_VFS.org
+++ b/source3/modules/The_New_VFS.org
@@ -260,7 +260,7 @@ whenever VFS access is done in a piecemeal fashion.
 | SMB_VFS_LSTAT()                   | [[Path][Path]]     | Todo   |
 | SMB_VFS_MKDIRAT()                 | [[NsC][NsC]]      | -      |
 | SMB_VFS_MKNODAT()                 | [[NsC][NsC]]      | -      |
-| SMB_VFS_NTIMES()                  | [[Path][Path]]     | Todo   |
+| SMB_VFS_NTIMES()                  | [[Path][Path]]    | -      |
 | SMB_VFS_OFFLOAD_READ_RECV()       | [[fsp][fsp]]      | -      |
 | SMB_VFS_OFFLOAD_READ_SEND()       | [[fsp][fsp]]      | -      |
 | SMB_VFS_OFFLOAD_WRITE_RECV()      | [[fsp][fsp]]      | -      |
@@ -310,7 +310,7 @@ whenever VFS access is done in a piecemeal fashion.
 |---------------------------------+----------+--------|
 | SMB_VFS_SYS_ACL_DELETE_DEF_FD() | [[xpathref][xpathref]] | Todo   |
 | SMB_VFS_READDIR_ATTRAT()        | [[Enum][Enum]]     | Todo   |
-| SMB_VFS_FUTIMENS()              | [[fsp][fsp]]      | Todo   |
+| SMB_VFS_FNTIMENS()              | [[fsp][fsp]]      | -      |
 |---------------------------------+----------+--------|
 
 ** VFS functions by category
diff --git a/source3/modules/The_New_VFS.txt b/source3/modules/The_New_VFS.txt
index 5121229dc0a..51e7d347a16 100644
--- a/source3/modules/The_New_VFS.txt
+++ b/source3/modules/The_New_VFS.txt
@@ -328,7 +328,7 @@ Table of Contents
    SMB_VFS_LSTAT()                    [Path]      Todo
    SMB_VFS_MKDIRAT()                  [NsC]       -
    SMB_VFS_MKNODAT()                  [NsC]       -
-   SMB_VFS_NTIMES()                   [Path]      Todo
+   SMB_VFS_NTIMES()                   [Path]      -
    SMB_VFS_OFFLOAD_READ_RECV()        [fsp]       -
    SMB_VFS_OFFLOAD_READ_SEND()        [fsp]       -
    SMB_VFS_OFFLOAD_WRITE_RECV()       [fsp]       -
@@ -400,7 +400,7 @@ Table of Contents
   ─────────────────────────────────────────────────────
    SMB_VFS_SYS_ACL_DELETE_DEF_FD()  [xpathref]  Todo
    SMB_VFS_READDIR_ATTRAT()         [Enum]      Todo
-   SMB_VFS_FUTIMENS()               [fsp]       Todo
+   SMB_VFS_FNTIMENS()               [fsp]       -
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
 
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index c24a2be05fd..0c12712a8f1 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -405,36 +405,6 @@ static int cap_chdir(vfs_handle_struct *handle,
 	return ret;
 }
 
-static int cap_ntimes(vfs_handle_struct *handle,
-		      const struct smb_filename *smb_fname,
-		      struct smb_file_time *ft)
-{
-	struct smb_filename *smb_fname_tmp = NULL;
-	char *cappath = NULL;
-	int ret;
-
-	cappath = capencode(talloc_tos(), smb_fname->base_name);
-
-	if (!cappath) {
-		errno = ENOMEM;
-		return -1;
-	}
-
-	/* Setup temporary smb_filename structs. */
-	smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname);
-	if (smb_fname_tmp == NULL) {
-		errno = ENOMEM;
-		return -1;
-	}
-
-	smb_fname_tmp->base_name = cappath;
-
-	ret = SMB_VFS_NEXT_NTIMES(handle, smb_fname_tmp, ft);
-
-	TALLOC_FREE(smb_fname_tmp);
-	return ret;
-}
-
 static int cap_symlinkat(vfs_handle_struct *handle,
 			const struct smb_filename *link_contents,
 			struct files_struct *dirfsp,
@@ -985,7 +955,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
 	.unlinkat_fn = cap_unlinkat,
 	.lchown_fn = cap_lchown,
 	.chdir_fn = cap_chdir,
-	.ntimes_fn = cap_ntimes,
 	.symlinkat_fn = cap_symlinkat,
 	.readlinkat_fn = cap_readlinkat,
 	.linkat_fn = cap_linkat,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 96843095f17..2106ca5e8ab 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -817,35 +817,21 @@ static int catia_chdir(vfs_handle_struct *handle,
 	return ret;
 }
 
-static int catia_ntimes(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname,
-			struct smb_file_time *ft)
+static int catia_fntimes(vfs_handle_struct *handle,
+			 files_struct *fsp,
+			 struct smb_file_time *ft)
 {
-	struct smb_filename *smb_fname_tmp = NULL;
-	char *name = NULL;
-	NTSTATUS status;
+	struct catia_cache *cc = NULL;
 	int ret;
 
-	status = catia_string_replace_allocate(handle->conn,
-				smb_fname->base_name,
-				&name, vfs_translate_to_unix);
-	if (!NT_STATUS_IS_OK(status)) {
-		errno = map_errno_from_nt_status(status);
-		return -1;
-	}
-
-	smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname);
-	if (smb_fname_tmp == NULL) {
-		errno = ENOMEM;
-		return -1;
+	ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
+	if (ret != 0) {
+		return ret;
 	}
 
-	smb_fname_tmp->base_name = name;
-	smb_fname_tmp->fsp = smb_fname->fsp;
+	ret = SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
 
-	ret = SMB_VFS_NEXT_NTIMES(handle, smb_fname_tmp, ft);
-	TALLOC_FREE(name);
-	TALLOC_FREE(smb_fname_tmp);
+	CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
 
 	return ret;
 }
@@ -2151,7 +2137,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
 	.fchown_fn = catia_fchown,
 	.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,
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index d627a2233ae..82b956ae85a 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -792,9 +792,9 @@ static int cephwrap_lstat(struct vfs_handle_struct *handle,
 	return result;
 }
 
-static int cephwrap_ntimes(struct vfs_handle_struct *handle,
-			 const struct smb_filename *smb_fname,
-			 struct smb_file_time *ft)
+static int cephwrap_fntimes(struct vfs_handle_struct *handle,
+			    files_struct *fsp,
+			    struct smb_file_time *ft)
 {
 	struct ceph_statx stx = { 0 };
 	int result;
@@ -817,10 +817,29 @@ static int cephwrap_ntimes(struct vfs_handle_struct *handle,
 		return 0;
 	}
 
-	result = ceph_setattrx(handle->data, smb_fname->base_name, &stx, mask, 0);
-	DBG_DEBUG("[CEPH] ntimes(%p, %s, {%ld, %ld, %ld, %ld}) = %d\n", handle, smb_fname_str_dbg(smb_fname),
-				ft->mtime.tv_sec, ft->atime.tv_sec, ft->ctime.tv_sec,
-				ft->create_time.tv_sec, result);
+	if (!fsp->fsp_flags.is_pathref) {
+		/*
+		 * We can use an io_fd to set xattrs.
+		 */
+		result = ceph_fsetattrx(handle->data,
+					fsp_get_io_fd(fsp),
+					&stx,
+					mask);
+	} else {
+		/*
+		 * This is no longer a handle based call.
+		 */
+		result = ceph_setattrx(handle->data,
+				       fsp->fsp_name->base_name,
+				       &stx,
+				       mask,
+				       0);
+	}
+
+	DBG_DEBUG("[CEPH] ntimes(%p, %s, {%ld, %ld, %ld, %ld}) = %d\n",
+		  handle, fsp_str_dbg(fsp), ft->mtime.tv_sec, ft->atime.tv_sec,
+		  ft->ctime.tv_sec, ft->create_time.tv_sec, result);
+
 	return result;
 }
 
@@ -1581,7 +1600,7 @@ static struct vfs_fn_pointers ceph_fns = {
 	.lchown_fn = cephwrap_lchown,
 	.chdir_fn = cephwrap_chdir,
 	.getwd_fn = cephwrap_getwd,
-	.ntimes_fn = cephwrap_ntimes,
+	.fntimes_fn = cephwrap_fntimes,
 	.ftruncate_fn = cephwrap_ftruncate,
 	.fallocate_fn = cephwrap_fallocate,
 	.lock_fn = cephwrap_lock,
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index eccc5fcbf3e..5d9d3161bb2 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -1003,16 +1003,18 @@ static int ceph_snap_gmt_chdir(vfs_handle_struct *handle,
 	return ret;
 }
 
-static int ceph_snap_gmt_ntimes(vfs_handle_struct *handle,
-			      const struct smb_filename *csmb_fname,
-			      struct smb_file_time *ft)
+static int ceph_snap_gmt_fntimes(vfs_handle_struct *handle,
+				 files_struct *fsp,
+				 struct smb_file_time *ft)
 {
 	time_t timestamp = 0;
 	int ret;
 
 	ret = ceph_snap_gmt_strip_snapshot(handle,
-					csmb_fname,
-					&timestamp, NULL, 0);
+					   fsp->fsp_name,
+					   &timestamp,
+					   NULL,
+					   0);
 	if (ret < 0) {
 		errno = -ret;
 		return -1;
@@ -1021,7 +1023,7 @@ static int ceph_snap_gmt_ntimes(vfs_handle_struct *handle,
 		errno = EROFS;
 		return -1;
 	}
-	return SMB_VFS_NEXT_NTIMES(handle, csmb_fname, ft);
+	return SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
 }
 
 static int ceph_snap_gmt_readlinkat(vfs_handle_struct *handle,
@@ -1464,7 +1466,7 @@ static struct vfs_fn_pointers ceph_snap_fns = {
 	.unlinkat_fn = ceph_snap_gmt_unlinkat,
 	.fchmod_fn = ceph_snap_gmt_fchmod,
 	.chdir_fn = ceph_snap_gmt_chdir,
-	.ntimes_fn = ceph_snap_gmt_ntimes,
+	.fntimes_fn = ceph_snap_gmt_fntimes,
 	.readlinkat_fn = ceph_snap_gmt_readlinkat,
 	.mknodat_fn = ceph_snap_gmt_mknodat,
 	.realpath_fn = ceph_snap_gmt_realpath,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 376d7f51ea1..1bb927f5a47 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2516,89 +2516,88 @@ static struct smb_filename *vfswrap_getwd(vfs_handle_struct *handle,
  system will support.
 **********************************************************************/
 
-static int vfswrap_ntimes(vfs_handle_struct *handle,
-			  const struct smb_filename *smb_fname,
-			  struct smb_file_time *ft)
+static int vfswrap_fntimes(vfs_handle_struct *handle,
+			   files_struct *fsp,
+			   struct smb_file_time *ft)
 {
 	int result = -1;
+	struct timespec ts[2];
+	struct timespec *times = NULL;
 
-	START_PROFILE(syscall_ntimes);
+	START_PROFILE(syscall_fntimes);
 
-	if (is_named_stream(smb_fname)) {
+	if (is_named_stream(fsp->fsp_name)) {
 		errno = ENOENT;
 		goto out;
 	}
 
 	if (ft != NULL) {
 		if (is_omit_timespec(&ft->atime)) {
-			ft->atime= smb_fname->st.st_ex_atime;
+			ft->atime = fsp->fsp_name->st.st_ex_atime;
 		}
 
 		if (is_omit_timespec(&ft->mtime)) {
-			ft->mtime = smb_fname->st.st_ex_mtime;
+			ft->mtime = fsp->fsp_name->st.st_ex_mtime;
 		}
 
 		if (!is_omit_timespec(&ft->create_time)) {
 			set_create_timespec_ea(handle->conn,
-					       smb_fname,
+					       fsp->fsp_name,
 					       ft->create_time);
 		}
 
 		if ((timespec_compare(&ft->atime,
-				      &smb_fname->st.st_ex_atime) == 0) &&
+				      &fsp->fsp_name->st.st_ex_atime) == 0) &&
 		    (timespec_compare(&ft->mtime,
-				      &smb_fname->st.st_ex_mtime) == 0)) {
-			return 0;
+				      &fsp->fsp_name->st.st_ex_mtime) == 0)) {
+			result = 0;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list