[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri Aug 16 21:11:03 UTC 2019


The branch, master has been updated
       via  5cb539d8ade s3: VFS: vfs_default. Convert underlying system call to renameat().
       via  6acf4c35b46 s3: VFS: Complete the replacement of SMB_VFS_RENAME() -> SMB_VFS_RENAMEAT().
       via  f0ac39d5615 s3: VFS: vfs_time_audit. Remove rename_fn(). No longer used.
       via  7aadbe5608e s3: VFS: vfs_full_audit. Remove rename_fn(). No longer used.
       via  5db3edba414 s3: VFS: vfs_virusfilter. Remove rename_fn(). No longer used.
       via  d45daf1ce86 s3: VFS: vfs_unityed_media. Remove rename_fn(). No longer used.
       via  33a243b7a2c s3: VFS: vfs_syncops. Remove rename_fn(). No longer used.
       via  110aff0caae s3: VFS: vfs_streams_xattr. Remove rename_fn(). No longer used.
       via  c661a5fbe6e s3: VFS: vfs_streams_depot: Change to using SMB_VFS_RENAMEAT() instead of SMB_VFS_RENAME().
       via  46d61e203c7 s3: VFS: vfs_streams_depot. Remove rename_fn(). No longer used.
       via  8e6a283a16f s3: VFS: vfs_snapper. Remove rename_fn(). No longer used.
       via  d080085273f s3: VFS: vfs_shadow_copy2. Remove rename_fn(). No longer used.
       via  055fda0830e s3: VFS: vfs_netatalk. Remove rename_fn(). No longer used.
       via  ca4e66cbd3a s3: VFS: vfs_media_harmony. Remove rename_fn(). No longer used.
       via  8afb453edc3 s3: VFS: vfs_glusterfs. Remove rename_fn(). No longer used.
       via  7486b3c9f57 s3: VFS: vfs_fruit. Remove rename_fn(). No longer used.
       via  0464730ee2a s3: VFS: vfs_extd_audit. Remove rename_fn(). No longer used.
       via  ba25d8fbb16 s3: VFS: vfs_crossrename. Remove rename_fn(). No longer used.
       via  52960225fa8 s3: VFS: vfs_ceph_snapshots. Remove rename_fn(). No longer used.
       via  086a7d78350 s3: VFS: vfs_ceph. Remove rename_fn(). No longer used.
       via  9cedbbe88cb s3: VFS: vfs_catia. Remove rename_fn(). No longer used.
       via  e591d92e98c s3: VFS: vfs_cap. Remove rename_fn(). No longer used.
       via  ef0d50c2722 s3: VFS: vfs_audit. Remove rename_fn(). No longer used.
       via  d439c2bab4a s3: VFS: vfs_recycle. Use SMB_VFS_RENAMEAT() instead of SMB_VFS_RENAME().
       via  20564183966 s3: smbd: vfs_virusfilter: Use SMB_VFS_RENAMEAT() instead of SMB_VFS_RENAME.
       via  25c1b853cf4 s3: torture: Change cmd_vfs to call SMB_VFS_RENAMEAT().
       via  74ecfe28a96 s3: smbd: Change rename_internals_fsp() to call SMB_VFS_RENAMEAT().
       via  d2fc9b136b7 s3: VFS: vfs_virusfilter. Implement renameat().
       via  7978814d3b5 s3: VFS: vfs_unityed_media. Implement renameat().
       via  16a455d3c38 s3: VFS: vfs_time_audit. Implement renameat().
       via  588e64ddd02 s3: VFS: vfs_syncops. Implement renameat().
       via  251bb56d1b0 s3: VFS: vfs_streams_xattr. Implement renameat().
       via  7ec34e6ab86 s3: VFS: vfs_streams_depot. Implement renameat().
       via  a85433f4bde s3: VFS: vfs_snapper. Implement renameat().
       via  a2d27f9113c s3: VFS: vfs_shadow_copy2. Implement renameat().
       via  9193cd402ff s3: VFS: vfs_netatalk. Implement renameat().
       via  e61da498994 s3: VFS: vfs_media_harmony. Implement renameat().
       via  318461eb7d3 s3: VFS: vfs_glusterfs. Implement renameat().
       via  4d74ed6f567 s3: VFS: vfs_full_audit. Implement renameat().
       via  8d8faa53fc7 s3: VFS: vfs_fruit. Implement renameat().
       via  ca298af67ce s3: VFS: vfs_extd_audit. Implement renameat().
       via  c36ba3aff88 s3: VFS: vfs_crossrename. Implement renameat().
       via  4a415f63e63 s3: VFS: vfs_ceph_snapshots. Implement renameat().
       via  ab74d8d5bd4 s3: VFS: vfs_ceph. Implement renameat().
       via  5528bcd4475 s3: VFS: vfs_catia. Implement renameat().
       via  9859102b204 s3: VFS: vfs_cap. Implement renameat().
       via  365b81238e2 s3: VFS: vfs_audit. Implement renameat().
       via  606398a3a6d s3: VFS: Add SMB_VFS_RENAMEAT().
       via  75f98a19537 s3: VFS: change connection_struct cwd_fname to cwd_fsp
       via  b535f78897e vfs_full_audit: pass conn to smb_fname_str_do_log()
       via  c9b38eb79c9 s3:smbd: modernize conn_new()
       via  04f5dbb168a s3: smbd: Reformatting. Use helper variable for SMB_VFS_RENAME call.
      from  3ee78cc9979 vfs_glusterfs: initialize st_ex_file_id, st_ex_itime and st_ex_iflags

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


- Log -----------------------------------------------------------------
commit 5cb539d8adedadee2089edd334ffc8c0bd3e4c77
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Aug 12 10:34:37 2019 -0700

    s3: VFS: vfs_default. Convert underlying system call to renameat().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Aug 16 21:10:14 UTC 2019 on sn-devel-184

commit 6acf4c35b46e8e7860209be00b688c631f0155bf
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:28:32 2019 -0700

    s3: VFS: Complete the replacement of SMB_VFS_RENAME() -> SMB_VFS_RENAMEAT().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit f0ac39d56156257275048a55f101665e32905da9
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:14:14 2019 -0700

    s3: VFS: vfs_time_audit. Remove rename_fn(). No longer used.
    
    NB, this will now fail smb_vfs_assert_all_fns()
    until we remove the rename_fn() from the VFS definitions.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7aadbe5608e0322fbb627b4da4382613fa9dd25d
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:04:35 2019 -0700

    s3: VFS: vfs_full_audit. Remove rename_fn(). No longer used.
    
    NB, this will now fail smb_vfs_assert_all_fns()
    until we remove the rename_fn() from the VFS definitions.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5db3edba41421f826f9a5a07efb17734c6c24969
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:38:11 2019 -0700

    s3: VFS: vfs_virusfilter. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d45daf1ce86801e5800203e64abcaca0e7381805
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:13:16 2019 -0700

    s3: VFS: vfs_unityed_media. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 33a243b7a2cf0bbcfde5a52dd70cef670164027c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:12:25 2019 -0700

    s3: VFS: vfs_syncops. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 110aff0caae03593e53a980c6c9074354f813a64
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:11:43 2019 -0700

    s3: VFS: vfs_streams_xattr. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit c661a5fbe6e7ff27effb084519b539b9c9819f0c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:29:58 2019 -0700

    s3: VFS: vfs_streams_depot: Change to using SMB_VFS_RENAMEAT() instead of SMB_VFS_RENAME().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 46d61e203c73092ae300e75c6c56e5769cb67609
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:10:57 2019 -0700

    s3: VFS: vfs_streams_depot. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 8e6a283a16f10f9d83e66d41271ccef536c85f0b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:10:06 2019 -0700

    s3: VFS: vfs_snapper. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d080085273f8c723dd1a844743904cf1cd9822a1
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:08:53 2019 -0700

    s3: VFS: vfs_shadow_copy2. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 055fda0830e2fe470ed23ccd963e29b4a8bb711b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:07:53 2019 -0700

    s3: VFS: vfs_netatalk. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ca4e66cbd3a04407353974a751f0c6de19bdc5a5
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:07:14 2019 -0700

    s3: VFS: vfs_media_harmony. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 8afb453edc37b352d4d7447049798399332e2490
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:06:11 2019 -0700

    s3: VFS: vfs_glusterfs. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7486b3c9f57b8e1353e93d51cd4597ad6f449509
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:03:11 2019 -0700

    s3: VFS: vfs_fruit. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0464730ee2a1f17ce0944df4bfd9f6aa56678117
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:01:57 2019 -0700

    s3: VFS: vfs_extd_audit. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ba25d8fbb16a1c11880e7434803b6c92b23647ee
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:59:54 2019 -0700

    s3: VFS: vfs_crossrename. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 52960225fa8727f9dfe91f76e921a3c56168347c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:59:05 2019 -0700

    s3: VFS: vfs_ceph_snapshots. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 086a7d7835081447424153331acc32360642e65b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:58:11 2019 -0700

    s3: VFS: vfs_ceph. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9cedbbe88cb26e79371c28b017a4078d7091f517
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:56:59 2019 -0700

    s3: VFS: vfs_catia. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit e591d92e98c2ddd6f98e2f9aa57f830ab573bf44
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:55:48 2019 -0700

    s3: VFS: vfs_cap. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ef0d50c27225f3a6cb570ed364ce17ffbae3506a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:41:59 2019 -0700

    s3: VFS: vfs_audit. Remove rename_fn(). No longer used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d439c2bab4a3b1b8c4f3cee0cfe4110f8ea3f88c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:27:49 2019 -0700

    s3: VFS: vfs_recycle. Use SMB_VFS_RENAMEAT() instead of SMB_VFS_RENAME().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 20564183966e36756b33c3b4e36d89a6932475e1
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:26:10 2019 -0700

    s3: smbd: vfs_virusfilter: Use SMB_VFS_RENAMEAT() instead of SMB_VFS_RENAME.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 25c1b853cf42b6e56090c1588d5696d24141829a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:40:47 2019 -0700

    s3: torture: Change cmd_vfs to call SMB_VFS_RENAMEAT().
    
    Use conn->cwd_fsp as current src and dst fsp's.
    
    No logic change for now.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 74ecfe28a96f2be960bd2d12a33f09a69582c54a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:38:32 2019 -0700

    s3: smbd: Change rename_internals_fsp() to call SMB_VFS_RENAMEAT().
    
    Use conn->cwd_fsp as current src and dst fsp's.
    
    No logic change for now.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d2fc9b136b7c632be92b078fa99a83d025b3d26e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 16:36:32 2019 -0700

    s3: VFS: vfs_virusfilter. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7978814d3b5a0b41b00b7c6043b9a12b88ca5b12
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:36:52 2019 -0700

    s3: VFS: vfs_unityed_media. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 16a455d3c3816a0a0fa82af8b04fa1c6fe6947a1
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:34:52 2019 -0700

    s3: VFS: vfs_time_audit. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 588e64ddd02cb6b63184d5edffe7b5f2432232d8
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:33:08 2019 -0700

    s3: VFS: vfs_syncops. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 251bb56d1b064cbc90729cc58d0549e8f561b4bd
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:31:03 2019 -0700

    s3: VFS: vfs_streams_xattr. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7ec34e6ab86c53e51896b717ede24bf1a9c0a14a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:28:56 2019 -0700

    s3: VFS: vfs_streams_depot. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a85433f4bdeaf493e5c4cbf1c4c0feb5b34a415a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:28:34 2019 -0700

    s3: VFS: vfs_snapper. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a2d27f9113cef750a2e9fe2aac3c70dc7191dada
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:13:24 2019 -0700

    s3: VFS: vfs_shadow_copy2. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9193cd402ff33caa853f341b90c7a9e25ebb5785
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:03:44 2019 -0700

    s3: VFS: vfs_netatalk. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit e61da4989946ff283e77c73cb201ab875de7d264
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:03:06 2019 -0700

    s3: VFS: vfs_media_harmony. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 318461eb7d3e1aa8651b6add54db10ea864bb380
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 15:02:35 2019 -0700

    s3: VFS: vfs_glusterfs. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 4d74ed6f567832a43dbf04a868efe0f30cb53752
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 14:25:21 2019 -0700

    s3: VFS: vfs_full_audit. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 8d8faa53fc7ef2163a3095ab29430fba06c8455a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 14:22:03 2019 -0700

    s3: VFS: vfs_fruit. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ca298af67cebee4c3efebf24f4b9d0ef1e73b047
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 14:19:09 2019 -0700

    s3: VFS: vfs_extd_audit. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit c36ba3aff88bbb93ea5048906775bcedfaeac221
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 14:16:12 2019 -0700

    s3: VFS: vfs_crossrename. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 4a415f63e6383ef4a293240ab77ec4ba92f25b4e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 13:49:46 2019 -0700

    s3: VFS: vfs_ceph_snapshots. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ab74d8d5bd4636405731c9d2aa2d32880844b349
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Aug 9 13:45:32 2019 -0700

    s3: VFS: vfs_ceph. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5528bcd44750cd989e051f6db6908e061e714f91
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 8 16:35:54 2019 -0700

    s3: VFS: vfs_catia. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9859102b204b5ba9a348e4df30aff9d3afc6aae3
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 8 16:13:20 2019 -0700

    s3: VFS: vfs_cap. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 365b81238e261bae2b4f4ffe968a11cb3c0ff50a
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 8 15:30:54 2019 -0700

    s3: VFS: vfs_audit. Implement renameat().
    
    Currently identical to rename().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 606398a3a6da349877eb1d6f585e3f58778624b2
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 8 15:22:31 2019 -0700

    s3: VFS: Add SMB_VFS_RENAMEAT().
    
    Currently identical to SMB_VFS_RENAME() - uses
    AT_FDCWD for both src and dst directories.
    
    Next, move add to all VFS modules that implement
    rename and eventually remove rename.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 75f98a19537c4d0791108ebfea82f3f9d4606cb3
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Aug 15 15:53:32 2019 +0200

    s3: VFS: change connection_struct cwd_fname to cwd_fsp
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b535f78897eb5989666501f9543df478af420ecc
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Aug 15 14:43:07 2019 +0200

    vfs_full_audit: pass conn to smb_fname_str_do_log()
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c9b38eb79c99ad054231950e6d56a86da1061f8c
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Aug 15 15:15:30 2019 +0200

    s3:smbd: modernize conn_new()
    
    Split the monstrous if into individual allocations. I'm going to add more talloc
    allocations in a subsequent commit, so it's time to split this up.
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 04f5dbb168a6b91aecb60ebb398a5f5297b288d5
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 8 14:38:24 2019 -0700

    s3: smbd: Reformatting. Use helper variable for SMB_VFS_RENAME call.
    
    Will make replacement with renameat() clearer later.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

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

Summary of changes:
 examples/VFS/skel_opaque.c               |  6 ++--
 examples/VFS/skel_transparent.c          | 12 +++++--
 source3/include/smbprofile.h             |  3 +-
 source3/include/vfs.h                    | 15 +++++---
 source3/include/vfs_macros.h             |  8 ++---
 source3/modules/vfs_audit.c              | 17 ++++++---
 source3/modules/vfs_cap.c                | 18 ++++++----
 source3/modules/vfs_catia.c              | 15 +++++---
 source3/modules/vfs_ceph.c               | 18 +++++-----
 source3/modules/vfs_ceph_snapshots.c     | 16 ++++++---
 source3/modules/vfs_crossrename.c        | 16 +++++----
 source3/modules/vfs_default.c            | 15 +++++---
 source3/modules/vfs_extd_audit.c         | 16 ++++++---
 source3/modules/vfs_fake_dfq.c           |  2 +-
 source3/modules/vfs_fruit.c              | 18 +++++++---
 source3/modules/vfs_full_audit.c         | 62 +++++++++++++++++---------------
 source3/modules/vfs_glusterfs.c          | 10 +++---
 source3/modules/vfs_media_harmony.c      | 16 ++++++---
 source3/modules/vfs_netatalk.c           | 36 +++++++++++--------
 source3/modules/vfs_not_implemented.c    |  6 ++--
 source3/modules/vfs_preopen.c            |  2 +-
 source3/modules/vfs_recycle.c            |  6 +++-
 source3/modules/vfs_shadow_copy2.c       | 17 ++++++---
 source3/modules/vfs_snapper.c            | 17 ++++++---
 source3/modules/vfs_streams_depot.c      | 29 ++++++++++-----
 source3/modules/vfs_streams_xattr.c      | 13 ++++---
 source3/modules/vfs_syncops.c            | 18 ++++++----
 source3/modules/vfs_time_audit.c         | 18 ++++++----
 source3/modules/vfs_unityed_media.c      | 26 +++++++++-----
 source3/modules/vfs_virusfilter.c        | 31 +++++++++-------
 source3/modules/vfs_virusfilter_clamav.c |  2 +-
 source3/modules/vfs_virusfilter_fsav.c   |  2 +-
 source3/modules/vfs_virusfilter_sophos.c |  2 +-
 source3/modules/vfs_virusfilter_utils.c  |  8 +++--
 source3/smbd/conn.c                      | 49 +++++++++++++++++++++----
 source3/smbd/reply.c                     |  8 ++++-
 source3/smbd/service.c                   |  8 ++---
 source3/smbd/uid.c                       |  2 +-
 source3/smbd/vfs.c                       | 39 +++++++++++++-------
 source3/torture/cmd_vfs.c                |  7 +++-
 40 files changed, 423 insertions(+), 206 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 55b576302a1..40e16c342ef 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -290,8 +290,10 @@ static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
 	return -1;
 }
 
-static int skel_rename(vfs_handle_struct *handle,
+static int skel_renameat(vfs_handle_struct *handle,
+		       files_struct *srcfsp,
 		       const struct smb_filename *smb_fname_src,
+		       files_struct *dstfsp,
 		       const struct smb_filename *smb_fname_dst)
 {
 	errno = ENOSYS;
@@ -1060,7 +1062,7 @@ static struct vfs_fn_pointers skel_opaque_fns = {
 	.lseek_fn = skel_lseek,
 	.sendfile_fn = skel_sendfile,
 	.recvfile_fn = skel_recvfile,
-	.rename_fn = skel_rename,
+	.renameat_fn = skel_renameat,
 	.fsync_send_fn = skel_fsync_send,
 	.fsync_recv_fn = skel_fsync_recv,
 	.stat_fn = skel_stat,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index eae2e9d5027..b5d44377463 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -369,11 +369,17 @@ static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd,
 	return SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, n);
 }
 
-static int skel_rename(vfs_handle_struct *handle,
+static int skel_renameat(vfs_handle_struct *handle,
+		       files_struct *srcfsp,
 		       const struct smb_filename *smb_fname_src,
+		       files_struct *dstfsp,
 		       const struct smb_filename *smb_fname_dst)
 {
-	return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+	return SMB_VFS_NEXT_RENAMEAT(handle,
+			srcfsp,
+			smb_fname_src,
+			dstfsp,
+			smb_fname_dst);
 }
 
 struct skel_fsync_state {
@@ -1322,7 +1328,7 @@ static struct vfs_fn_pointers skel_transparent_fns = {
 	.lseek_fn = skel_lseek,
 	.sendfile_fn = skel_sendfile,
 	.recvfile_fn = skel_recvfile,
-	.rename_fn = skel_rename,
+	.renameat_fn = skel_renameat,
 	.fsync_send_fn = skel_fsync_send,
 	.fsync_recv_fn = skel_fsync_recv,
 	.stat_fn = skel_stat,
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 8888ae3eaa8..c479c76d508 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -61,8 +61,7 @@ struct tevent_context;
 	SMBPROFILE_STATS_BASIC(syscall_lseek) \
 	SMBPROFILE_STATS_BYTES(syscall_sendfile) \
 	SMBPROFILE_STATS_BYTES(syscall_recvfile) \
-	SMBPROFILE_STATS_BASIC(syscall_rename) \
-	SMBPROFILE_STATS_BASIC(syscall_rename_at) \
+	SMBPROFILE_STATS_BASIC(syscall_renameat) \
 	SMBPROFILE_STATS_BYTES(syscall_asys_fsync) \
 	SMBPROFILE_STATS_BASIC(syscall_stat) \
 	SMBPROFILE_STATS_BASIC(syscall_fstat) \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index aec9546681b..dc407772079 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -272,6 +272,7 @@
 /* Bump to version 42, Samba 4.12 will ship with that */
 /* Version 42 - Remove share_access member from struct files_struct */
 /* Version 42 - Make "lease" a const* in create_file_fn */
+/* Version 42 - Move SMB_VFS_RENAME -> SMB_VFS_RENAMEAT */
 
 #define SMB_VFS_INTERFACE_VERSION 42
 
@@ -475,7 +476,7 @@ typedef struct connection_struct {
 	enum timestamp_set_resolution ts_res;
 	char *connectpath;
 	char *origpath;
-	struct smb_filename *cwd_fname; /* Working directory. */
+	struct files_struct *cwd_fsp; /* Working directory. */
 	bool tcon_done;
 
 	struct vfs_handle_struct *vfs_handles;		/* for the new plugins */
@@ -744,8 +745,10 @@ struct vfs_fn_pointers {
 	off_t (*lseek_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, off_t offset, int whence);
 	ssize_t (*sendfile_fn)(struct vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *header, off_t offset, size_t count);
 	ssize_t (*recvfile_fn)(struct vfs_handle_struct *handle, int fromfd, files_struct *tofsp, off_t offset, size_t count);
-	int (*rename_fn)(struct vfs_handle_struct *handle,
+	int (*renameat_fn)(struct vfs_handle_struct *handle,
+			 struct files_struct *srcdir_fsp,
 			 const struct smb_filename *smb_fname_src,
+			 struct files_struct *dstdir_fsp,
 			 const struct smb_filename *smb_fname_dst);
 	struct tevent_req *(*fsync_send_fn)(struct vfs_handle_struct *handle,
 					    TALLOC_CTX *mem_ctx,
@@ -1254,8 +1257,10 @@ ssize_t smb_vfs_call_sendfile(struct vfs_handle_struct *handle, int tofd,
 ssize_t smb_vfs_call_recvfile(struct vfs_handle_struct *handle, int fromfd,
 			      files_struct *tofsp, off_t offset,
 			      size_t count);
-int smb_vfs_call_rename(struct vfs_handle_struct *handle,
+int smb_vfs_call_renameat(struct vfs_handle_struct *handle,
+			struct files_struct *srcfsp,
 			const struct smb_filename *smb_fname_src,
+			struct files_struct *dstfsp,
 			const struct smb_filename *smb_fname_dst);
 
 struct tevent_req *smb_vfs_call_fsync_send(struct vfs_handle_struct *handle,
@@ -1685,8 +1690,10 @@ ssize_t vfs_not_implemented_sendfile(vfs_handle_struct *handle, int tofd,
 				     off_t offset, size_t n);
 ssize_t vfs_not_implemented_recvfile(vfs_handle_struct *handle, int fromfd,
 				     files_struct *tofsp, off_t offset, size_t n);
-int vfs_not_implemented_rename(vfs_handle_struct *handle,
+int vfs_not_implemented_renameat(vfs_handle_struct *handle,
+			       files_struct *srcfsp,
 			       const struct smb_filename *smb_fname_src,
+			       files_struct *dstfsp,
 			       const struct smb_filename *smb_fname_dst);
 struct tevent_req *vfs_not_implemented_fsync_send(struct vfs_handle_struct *handle,
 						  TALLOC_CTX *mem_ctx,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index fd0d9681084..7bbdc97a6c6 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -185,10 +185,10 @@
 #define SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, count) \
 	smb_vfs_call_recvfile((handle)->next, (fromfd), (tofsp), (offset), (count))
 
-#define SMB_VFS_RENAME(conn, old, new) \
-	smb_vfs_call_rename((conn)->vfs_handles, (old), (new))
-#define SMB_VFS_NEXT_RENAME(handle, old, new) \
-	smb_vfs_call_rename((handle)->next, (old), (new))
+#define SMB_VFS_RENAMEAT(conn, oldfsp, old, newfsp, new) \
+	smb_vfs_call_renameat((conn)->vfs_handles, (oldfsp), (old), (newfsp), (new))
+#define SMB_VFS_NEXT_RENAMEAT(handle, oldfsp, old, newfsp, new) \
+	smb_vfs_call_renameat((handle)->next, (oldfsp), (old), (newfsp), (new))
 
 #define SMB_VFS_FSYNC(fsp) \
 	smb_vfs_call_fsync((fsp)->conn->vfs_handles, (fsp))
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index 91610377c1c..55f5dd52d01 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -256,23 +256,30 @@ static int audit_close(vfs_handle_struct *handle, files_struct *fsp)
 	return result;
 }
 
-static int audit_rename(vfs_handle_struct *handle,
+static int audit_renameat(vfs_handle_struct *handle,
+			files_struct *srcfsp,
 			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
 			const struct smb_filename *smb_fname_dst)
 {
 	int result;
 
-	result = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+	result = SMB_VFS_NEXT_RENAMEAT(handle,
+			srcfsp,
+			smb_fname_src,
+			dstfsp,
+			smb_fname_dst);
 
-	syslog(audit_syslog_priority(handle), "rename %s -> %s %s%s\n",
+	syslog(audit_syslog_priority(handle), "renameat %s -> %s %s%s\n",
 	       smb_fname_src->base_name,
 	       smb_fname_dst->base_name,
 	       (result < 0) ? "failed: " : "",
 	       (result < 0) ? strerror(errno) : "");
 
-	return result;    
+	return result;
 }
 
+
 static int audit_unlink(vfs_handle_struct *handle,
 			const struct smb_filename *smb_fname)
 {
@@ -326,7 +333,7 @@ static struct vfs_fn_pointers vfs_audit_fns = {
 	.rmdir_fn = audit_rmdir,
 	.open_fn = audit_open,
 	.close_fn = audit_close,
-	.rename_fn = audit_rename,
+	.renameat_fn = audit_renameat,
 	.unlink_fn = audit_unlink,
 	.chmod_fn = audit_chmod,
 	.fchmod_fn = audit_fchmod,
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 56b7efe1b42..ee48e542930 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -216,9 +216,11 @@ static int cap_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
 	return ret;
 }
 
-static int cap_rename(vfs_handle_struct *handle,
-		      const struct smb_filename *smb_fname_src,
-		      const struct smb_filename *smb_fname_dst)
+static int cap_renameat(vfs_handle_struct *handle,
+			files_struct *srcfsp,
+			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
+			const struct smb_filename *smb_fname_dst)
 {
 	char *capold = NULL;
 	char *capnew = NULL;
@@ -248,8 +250,12 @@ static int cap_rename(vfs_handle_struct *handle,
 	smb_fname_src_tmp->base_name = capold;
 	smb_fname_dst_tmp->base_name = capnew;
 
-	ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src_tmp,
-				  smb_fname_dst_tmp);
+	ret = SMB_VFS_NEXT_RENAMEAT(handle,
+				srcfsp,
+				smb_fname_src_tmp,
+				dstfsp,
+				smb_fname_dst_tmp);
+
  out:
 	TALLOC_FREE(capold);
 	TALLOC_FREE(capnew);
@@ -1009,7 +1015,7 @@ static struct vfs_fn_pointers vfs_cap_fns = {
 	.mkdir_fn = cap_mkdir,
 	.rmdir_fn = cap_rmdir,
 	.open_fn = cap_open,
-	.rename_fn = cap_rename,
+	.renameat_fn = cap_renameat,
 	.stat_fn = cap_stat,
 	.lstat_fn = cap_lstat,
 	.unlink_fn = cap_unlink,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 2c31c873fad..96c84e14d40 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -559,8 +559,10 @@ static int catia_open(vfs_handle_struct *handle,
 	return ret;
 }
 
-static int catia_rename(vfs_handle_struct *handle,
+static int catia_renameat(vfs_handle_struct *handle,
+			files_struct *srcfsp,
 			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
 			const struct smb_filename *smb_fname_dst)
 {
 	TALLOC_CTX *ctx = talloc_tos();
@@ -601,14 +603,18 @@ static int catia_rename(vfs_handle_struct *handle,
 	}
 
 	smb_fname_src_tmp->base_name = src_name_mapped;
-	smb_fname_dst_tmp->base_name = dst_name_mapped;	
+	smb_fname_dst_tmp->base_name = dst_name_mapped;
 	DEBUG(10, ("converted old name: %s\n",
 				smb_fname_str_dbg(smb_fname_src_tmp)));
 	DEBUG(10, ("converted new name: %s\n",
 				smb_fname_str_dbg(smb_fname_dst_tmp)));
 
-	ret = SMB_VFS_NEXT_RENAME(handle, smb_fname_src_tmp,
+	ret = SMB_VFS_NEXT_RENAMEAT(handle,
+			srcfsp,
+			smb_fname_src_tmp,
+			dstfsp,
 			smb_fname_dst_tmp);
+
 out:
 	TALLOC_FREE(src_name_mapped);
 	TALLOC_FREE(dst_name_mapped);
@@ -617,6 +623,7 @@ out:
 	return ret;
 }
 
+
 static int catia_stat(vfs_handle_struct *handle,
 		      struct smb_filename *smb_fname)
 {
@@ -2435,7 +2442,7 @@ static struct vfs_fn_pointers vfs_catia_fns = {
 	.pwrite_send_fn = catia_pwrite_send,
 	.pwrite_recv_fn = catia_pwrite_recv,
 	.lseek_fn = catia_lseek,
-	.rename_fn = catia_rename,
+	.renameat_fn = catia_renameat,
 	.fsync_send_fn = catia_fsync_send,
 	.fsync_recv_fn = catia_fsync_recv,
 	.stat_fn = catia_stat,
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 28363f003c2..0a181327d27 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -606,12 +606,14 @@ static ssize_t cephwrap_recvfile(struct vfs_handle_struct *handle,
 	return -1;
 }
 
-static int cephwrap_rename(struct vfs_handle_struct *handle,
-			  const struct smb_filename *smb_fname_src,
-			  const struct smb_filename *smb_fname_dst)
+static int cephwrap_renameat(struct vfs_handle_struct *handle,
+			files_struct *srcfsp,
+			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
+			const struct smb_filename *smb_fname_dst)
 {
 	int result = -1;
-	DBG_DEBUG("[CEPH] cephwrap_rename\n");
+	DBG_DEBUG("[CEPH] cephwrap_renameat\n");
 	if (smb_fname_src->stream_name || smb_fname_dst->stream_name) {
 		errno = ENOENT;
 		return result;
@@ -1200,14 +1202,14 @@ static struct smb_filename *cephwrap_realpath(struct vfs_handle_struct *handle,
 	} else if ((len >= 2) && (path[0] == '.') && (path[1] == '/')) {
 		if (len == 2) {
 			r = asprintf(&result, "%s",
-					handle->conn->cwd_fname->base_name);
+					handle->conn->cwd_fsp->fsp_name->base_name);
 		} else {
 			r = asprintf(&result, "%s/%s",
-					handle->conn->cwd_fname->base_name, &path[2]);
+					handle->conn->cwd_fsp->fsp_name->base_name, &path[2]);
 		}
 	} else {
 		r = asprintf(&result, "%s/%s",
-				handle->conn->cwd_fname->base_name, path);
+				handle->conn->cwd_fsp->fsp_name->base_name, path);
 	}
 
 	if (r < 0) {
@@ -1426,7 +1428,7 @@ static struct vfs_fn_pointers ceph_fns = {
 	.lseek_fn = cephwrap_lseek,
 	.sendfile_fn = cephwrap_sendfile,
 	.recvfile_fn = cephwrap_recvfile,
-	.rename_fn = cephwrap_rename,
+	.renameat_fn = cephwrap_renameat,
 	.fsync_send_fn = cephwrap_fsync_send,
 	.fsync_recv_fn = cephwrap_fsync_recv,
 	.stat_fn = cephwrap_stat,
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index a70a6adb1f4..5b4296f0caf 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -756,9 +756,11 @@ static DIR *ceph_snap_gmt_opendir(vfs_handle_struct *handle,
 	return dir;
 }
 
-static int ceph_snap_gmt_rename(vfs_handle_struct *handle,
-			      const struct smb_filename *smb_fname_src,
-			      const struct smb_filename *smb_fname_dst)
+static int ceph_snap_gmt_renameat(vfs_handle_struct *handle,
+			files_struct *srcfsp,
+			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
+			const struct smb_filename *smb_fname_dst)
 {
 	int ret;
 	time_t timestamp_src, timestamp_dst;
@@ -785,7 +787,11 @@ static int ceph_snap_gmt_rename(vfs_handle_struct *handle,
 		errno = EROFS;
 		return -1;
 	}
-	return SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+	return SMB_VFS_NEXT_RENAMEAT(handle,
+				srcfsp,
+				smb_fname_src,
+				dstfsp,
+				smb_fname_dst);
 }
 
 /* block links from writeable shares to snapshots for now, like other modules */
@@ -1594,7 +1600,7 @@ static struct vfs_fn_pointers ceph_snap_fns = {
 	.opendir_fn = ceph_snap_gmt_opendir,
 	.disk_free_fn = ceph_snap_gmt_disk_free,
 	.get_quota_fn = ceph_snap_gmt_get_quota,
-	.rename_fn = ceph_snap_gmt_rename,
+	.renameat_fn = ceph_snap_gmt_renameat,
 	.link_fn = ceph_snap_gmt_link,
 	.symlink_fn = ceph_snap_gmt_symlink,
 	.stat_fn = ceph_snap_gmt_stat,
diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c
index f1cae9aee7d..4e512655c33 100644
--- a/source3/modules/vfs_crossrename.c
+++ b/source3/modules/vfs_crossrename.c
@@ -167,14 +167,15 @@ static int copy_reg(const char *source, const char *dest)
 	return -1;
 }
 
-
-static int crossrename_rename(vfs_handle_struct *handle,
-			  const struct smb_filename *smb_fname_src,
-			  const struct smb_filename *smb_fname_dst)
+static int crossrename_renameat(vfs_handle_struct *handle,
+			files_struct *srcfsp,
+			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
+			const struct smb_filename *smb_fname_dst)
 {
 	int result = -1;
 
-	START_PROFILE(syscall_rename);
+	START_PROFILE(syscall_renameat);
 
 	if (smb_fname_src->stream_name || smb_fname_dst->stream_name) {
 		errno = ENOENT;
@@ -189,13 +190,14 @@ static int crossrename_rename(vfs_handle_struct *handle,
 	}
 
  out:
-	END_PROFILE(syscall_rename);
+	END_PROFILE(syscall_renameat);
 	return result;
 }
 
+
 static struct vfs_fn_pointers vfs_crossrename_fns = {
 	.connect_fn = crossrename_connect,
-	.rename_fn = crossrename_rename
+	.renameat_fn = crossrename_renameat
 };
 
 static_decl_vfs;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 213c6ddd9cd..a2b6bf6e669 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1067,23 +1067,28 @@ static ssize_t vfswrap_recvfile(vfs_handle_struct *handle,
 	return result;
 }
 
-static int vfswrap_rename(vfs_handle_struct *handle,
+static int vfswrap_renameat(vfs_handle_struct *handle,
+			  files_struct *srcfsp,
 			  const struct smb_filename *smb_fname_src,
+			  files_struct *dstfsp,
 			  const struct smb_filename *smb_fname_dst)
 {
 	int result = -1;
 
-	START_PROFILE(syscall_rename);
+	START_PROFILE(syscall_renameat);
 
 	if (smb_fname_src->stream_name || smb_fname_dst->stream_name) {
 		errno = ENOENT;
 		goto out;
 	}
 
-	result = rename(smb_fname_src->base_name, smb_fname_dst->base_name);
+	result = renameat(srcfsp->fh->fd,
+			smb_fname_src->base_name,
+			dstfsp->fh->fd,
+			smb_fname_dst->base_name);
 
  out:
-	END_PROFILE(syscall_rename);
+	END_PROFILE(syscall_renameat);
 	return result;
 }
 
@@ -3438,7 +3443,7 @@ static struct vfs_fn_pointers vfs_default_fns = {
 	.lseek_fn = vfswrap_lseek,
 	.sendfile_fn = vfswrap_sendfile,
 	.recvfile_fn = vfswrap_recvfile,
-	.rename_fn = vfswrap_rename,
+	.renameat_fn = vfswrap_renameat,
 	.fsync_send_fn = vfswrap_fsync_send,
 	.fsync_recv_fn = vfswrap_fsync_recv,
 	.stat_fn = vfswrap_stat,
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 7bbf30e9efd..70c889c4675 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -296,22 +296,28 @@ static int audit_close(vfs_handle_struct *handle, files_struct *fsp)
 	return result;
 }
 
-static int audit_rename(vfs_handle_struct *handle,
+static int audit_renameat(vfs_handle_struct *handle,
+			files_struct *srcfsp,
 			const struct smb_filename *smb_fname_src,
+			files_struct *dstfsp,
 			const struct smb_filename *smb_fname_dst)
 {
 	int result;
 
-	result = SMB_VFS_NEXT_RENAME(handle, smb_fname_src, smb_fname_dst);
+	result = SMB_VFS_NEXT_RENAMEAT(handle,
+			srcfsp,
+			smb_fname_src,
+			dstfsp,
+			smb_fname_dst);
 
 	if (lp_syslog() > 0) {
-		syslog(audit_syslog_priority(handle), "rename %s -> %s %s%s\n",
+		syslog(audit_syslog_priority(handle), "renameat %s -> %s %s%s\n",
 		       smb_fname_src->base_name,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list