[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Thu Oct 10 07:27:05 UTC 2019


The branch, master has been updated
       via  81fbba8f649 s3: VFS: Complete the removal of SMB_VFS_RMDIR()
       via  5bf96b1f0b6 s3: VFS: vfs_time_audit: Remove rmdir_fn(). No longer used.
       via  4fcd20cd6bf s3: VFS: vfs_time_audit: Remove rmdir_fn(). No longer used.
       via  14e24881c4e s3: VFS: vfs_syncops: Remove rmdir_fn(). No longer used.
       via  ffa09e09e87 s3: VFS: vfs_streams_depot: Remove rmdir_fn(). No longer used.
       via  a940c4c5ac1 s3: VFS: vfs_snapper: Remove rmdir_fn(). No longer used.
       via  8bb2c7b8989 s3: VFS: vfs_shadow_copy2: Remove rmdir_fn(). No longer used.
       via  8e65a8c2e7d s3: VFS: vfs_posix_eadb: Remove rmdir_fn(). No longer used.
       via  ae28488fb04 s3: VFS: vfs_media_harmony: Remove rmdir_fn(). No longer used.
       via  5e1e58a1e77 s3: VFS: vfs_glusterfs: Remove rmdir_fn(). No longer used.
       via  ea386e13fc4 s3: VFS: vfs_extd_audit: Remove rmdir_fn(). No longer used.
       via  09d33f5b31f s3: VFS: vfs_ceph_snapshots: Remove rmdir_fn(). No longer used.
       via  882babe6de7 s3: VFS: vfs_ceph: Remove rmdir_fn(). No longer used.
       via  b79c7d28738 s3: VFS: vfs_catia: Remove rmdir_fn(). No longer used.
       via  b222c486b36 s3: VFS: vfs_cap: Remove rmdir_fn(). No longer used.
       via  8a18518edea s3: VFS: vfs_audit: Remove rmdir_fn(). No longer used.
       via  26eb0e70bc8 s3: VFS: vfs_acl_xattr: Remove rmdir_fn(). No longer used.
       via  19a4c5a9933 s3: VFS: vfs_acl_tdb: Remove rmdir_fn(). No longer used.
       via  060eb647f43 s3: VFS: vfs_fruit: Remove rmdir_fn. No longer used.
       via  44f9adc155f s3: VFS: vfs_unityed_media: Remove rmdir_fn. No longer used.
       via  305f2b8d01c s3: VFS: vfs_xattr_tdb: Remove rmdir_fn. No longer used.
       via  4ce152f1c43 s3: smbd: Change rmdir_internals() to call SMB_VFS_UNLINKAT() in rmdir cases.
       via  ca5e8938ce3 s3: smbd: Change recursive_rmdir() to call SMB_VFS_UNLINKAT() in rmdir case.
       via  7991a12e3f2 s3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT() in rmdir case.
       via  576a143deb3 s3: VFS: vfs_fruit: Change fruit_rmdir_internal() to call UNLINKAT instead of RMDIR.
       via  c6235f297e7 s3: VFS: vfs_streams_depot: Change RMDIR -> UNLINKAT inside streams_depot_unlink_internal().
       via  9c5dc89c0b1 s3: VFS: vfs_streams_depot: Change RMDIR -> UNLINKAT inside stream_dir().
       via  d9091d8fa96 s3: VFS: vfs_streams_depot: Add a dirfsp parameter to streams_depot_rmdir_internal().
       via  48ad93aec53 s3: VFS: vfs_streams_depot: Rename streams_depot_rmdir() to streams_depot_rmdir_internal().
       via  881ee37c81c s3: VFS: vfs_posix_eadb: Convert streams_depot_rmdir_internal() to call UNLINKAT() instead of RMDIR().
       via  a8507856ef1 s3: VFS: vfs_posix_eadb: Convert posix_eadb_rmdir_internal() to call UNLINKAT() instead of RMDIR().
       via  3221bab80fe s3: VFS: vfs_posix_eadb: Add a dirfsp parameter to posix_eadb_rmdir_internal().
       via  4e028aeaff9 s3: VFS: vfs_posix_eadb: Rename posix_eadb_rmdir() to posix_eadb_rmdir_internal().
       via  0df3371e7a4 s3: VFS: vfs_acl_common: Convert rmdir_acl_common() to use UNLINKAT instead of RMDIR.
       via  7f54bc8794b s3: VFS: Change rmdir_acl_common() to take a files_struct *dirfsp pointer.
       via  1c0c3b61038 s3: VFS: vfs_acl_common: Change acl_common_remove_object() to use UNLINKAT instead of RMDIR.
       via  9290510fe4d s3: VFS: vfs_acl_xattr. Wrap rmdir_acl_common() by acl_xattr_rmdir() so we don't call it directly.
      from  b4cbdddfb87 smbd: Fix an uninitalized variable

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


- Log -----------------------------------------------------------------
commit 81fbba8f649e4115961eb77462ca450e7a30611e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:41:21 2019 -0700

    s3: VFS: Complete the removal of SMB_VFS_RMDIR()
    
    All users now use SMB_VFS_UNLINKAT(..., AT_REMOVEDIR).
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Thu Oct 10 07:26:43 UTC 2019 on sn-devel-184

commit 5bf96b1f0b61847771aab7be35121a1d5c15554e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:23:44 2019 -0700

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

commit 4fcd20cd6bfc646f4ee9319aae0bf6306f1c1a7c
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:22:19 2019 -0700

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

commit 14e24881c4e2839e896c3b6e8b94ecc7a990947f
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:21:21 2019 -0700

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

commit ffa09e09e87ff82d0091529230d9122358d70e96
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:17:32 2019 -0700

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

commit a940c4c5ac180acf15d005fb3d4fa4a0b3e9b448
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:10:58 2019 -0700

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

commit 8bb2c7b8989411ac7ebd06ef6621b2a38acf7243
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:10:07 2019 -0700

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

commit 8e65a8c2e7ddbc3a53f7adf240cb2a31eb4fdc51
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:09:00 2019 -0700

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

commit ae28488fb0447d1e3135d5f9569a633fe75c4661
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:52:18 2019 -0700

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

commit 5e1e58a1e7734f0b607c24b4f71a6f6224994bab
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:51:15 2019 -0700

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

commit ea386e13fc41cd1c42d6708b9898e74bfc8bb375
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:49:54 2019 -0700

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

commit 09d33f5b31f591c18a29be2265a4b536f3348c2b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:44:48 2019 -0700

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

commit 882babe6de7b6410434868294541492181b3b4aa
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:44:08 2019 -0700

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

commit b79c7d28738e5e9a33d5f7db9db61116295ac5d5
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:43:11 2019 -0700

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

commit b222c486b36e4cff7d827aedb90f5bfa5c3a9fd3
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:42:26 2019 -0700

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

commit 8a18518edead4c828a62615365c99624e4315e69
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:41:26 2019 -0700

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

commit 26eb0e70bc8aa12890cdc23c3ea6c2e0d408848b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:40:26 2019 -0700

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

commit 19a4c5a99334ac38becdf6197e154f98c0455ff6
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:39:30 2019 -0700

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

commit 060eb647f437f4fefb4e511061e48dd62d0c3099
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:14:17 2019 -0700

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

commit 44f9adc155fc59836580e1d9bc4820d547082fbd
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:01:55 2019 -0700

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

commit 305f2b8d01c5e9ecaa599372f75656169e777c7f
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 13:53:13 2019 -0700

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

commit 4ce152f1c43a2eb5c96da2f24b3829e4118774e2
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 13:51:09 2019 -0700

    s3: smbd: Change rmdir_internals() to call SMB_VFS_UNLINKAT() in rmdir cases.
    
    Use conn->cwd_fsp as current fsp.
    
    No logic change for now.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ca5e8938ce36835b5f381379560e77fb6cf9cf90
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 12:54:05 2019 -0700

    s3: smbd: Change recursive_rmdir() to call SMB_VFS_UNLINKAT() in rmdir case.
    
    Use conn->cwd_fsp as current fsp.
    
    No logic change for now.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7991a12e3f2b76220ab9885a98f4b427f035af81
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 12:51:06 2019 -0700

    s3: cmd_vfs: Change cmd_pathfunc() to call SMB_VFS_UNLINKAT() in rmdir case.
    
    Use conn->cwd_fsp as current fsp.
    
    No logic change for now.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 576a143deb3aa2ab4ba183a8e81874d6210e9026
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:03:39 2019 -0700

    s3: VFS: vfs_fruit: Change fruit_rmdir_internal() to call UNLINKAT instead of RMDIR.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit c6235f297e7da35411c0effa2394bdc679e433c9
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:40:34 2019 -0700

    s3: VFS: vfs_streams_depot: Change RMDIR -> UNLINKAT inside streams_depot_unlink_internal().
    
    No logic change.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9c5dc89c0b1a3c33840428d04034abe4dcfbbd7b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:38:45 2019 -0700

    s3: VFS: vfs_streams_depot: Change RMDIR -> UNLINKAT inside stream_dir().
    
    No logic change.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d9091d8fa96645886e7fb35ac95ed0f5b2f5c72a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:14:21 2019 -0700

    s3: VFS: vfs_streams_depot: Add a dirfsp parameter to streams_depot_rmdir_internal().
    
    Not yet used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 48ad93aec53e547de5919ec13056c7a4fd5cbf02
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:12:30 2019 -0700

    s3: VFS: vfs_streams_depot: Rename streams_depot_rmdir() to streams_depot_rmdir_internal().
    
    Make rmdir_fn() a wrapper function. This will
    allow us to add the dirfsp parameter.
    
    Fix DEBUG statement so it doesn't print the wrong function name.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 881ee37c81c0b94c62c92cd4debf2fe52ad7cd63
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:16:06 2019 -0700

    s3: VFS: vfs_posix_eadb: Convert streams_depot_rmdir_internal() to call UNLINKAT() instead of RMDIR().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a8507856ef1fc005a0fefa6e764663b48ec8ea1b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:07:46 2019 -0700

    s3: VFS: vfs_posix_eadb: Convert posix_eadb_rmdir_internal() to call UNLINKAT() instead of RMDIR().
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 3221bab80feff7f9e3af05c08f13ecb3a0cf8cde
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:06:23 2019 -0700

    s3: VFS: vfs_posix_eadb: Add a dirfsp parameter to posix_eadb_rmdir_internal().
    
    Not yet used.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 4e028aeaff99b4fee71925bca8d3eae0a4841947
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 15:04:02 2019 -0700

    s3: VFS: vfs_posix_eadb: Rename posix_eadb_rmdir() to posix_eadb_rmdir_internal().
    
    Make rmdir_fn() a wrapper function. This will
    allow us to add the dirfsp parameter.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0df3371e7a483fd286e96f95c8a4c227e2b686ab
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:37:01 2019 -0700

    s3: VFS: vfs_acl_common: Convert rmdir_acl_common() to use UNLINKAT instead of RMDIR.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7f54bc8794b7dc48b1f0b4c500a144c830f3da74
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:34:41 2019 -0700

    s3: VFS: Change rmdir_acl_common() to take a files_struct *dirfsp pointer.
    
    Pass in the passed dirfsp if available, else handle->conn->cwd_fsp.
    
    No logic changes.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 1c0c3b61038631f06795fcd9a1424a666b117db1
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:25:00 2019 -0700

    s3: VFS: vfs_acl_common: Change acl_common_remove_object() to use UNLINKAT instead of RMDIR.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9290510fe4d2b5ce88a6085e7047f1e6fafd6f5a
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 4 14:31:59 2019 -0700

    s3: VFS: vfs_acl_xattr. Wrap rmdir_acl_common() by acl_xattr_rmdir() so we don't call it directly.
    
    This will allow adding the extra dirfsp parameter to
    rmdir_acl_common().
    
    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            |  8 -------
 examples/VFS/skel_transparent.c       |  7 ------
 source3/include/smbprofile.h          |  1 -
 source3/include/vfs.h                 |  8 ++-----
 source3/include/vfs_macros.h          |  5 -----
 source3/modules/vfs_acl_common.c      | 13 ++++++++---
 source3/modules/vfs_acl_common.h      |  3 ++-
 source3/modules/vfs_acl_tdb.c         | 31 +++-----------------------
 source3/modules/vfs_acl_xattr.c       |  5 +++--
 source3/modules/vfs_audit.c           | 16 --------------
 source3/modules/vfs_cap.c             | 26 ----------------------
 source3/modules/vfs_catia.c           | 35 ------------------------------
 source3/modules/vfs_ceph.c            | 12 ----------
 source3/modules/vfs_ceph_snapshots.c  | 21 ------------------
 source3/modules/vfs_default.c         | 12 ----------
 source3/modules/vfs_extd_audit.c      | 22 -------------------
 source3/modules/vfs_fruit.c           | 14 ++++--------
 source3/modules/vfs_full_audit.c      | 19 ----------------
 source3/modules/vfs_glusterfs.c       | 14 ------------
 source3/modules/vfs_media_harmony.c   | 36 ------------------------------
 source3/modules/vfs_not_implemented.c |  8 -------
 source3/modules/vfs_posix_eadb.c      | 13 +++++++----
 source3/modules/vfs_shadow_copy2.c    | 20 -----------------
 source3/modules/vfs_snapper.c         | 17 ---------------
 source3/modules/vfs_streams_depot.c   | 33 +++++++++++++++++++---------
 source3/modules/vfs_syncops.c         |  7 ------
 source3/modules/vfs_time_audit.c      | 22 -------------------
 source3/modules/vfs_unityed_media.c   | 29 -------------------------
 source3/modules/vfs_xattr_tdb.c       | 41 -----------------------------------
 source3/smbd/close.c                  | 24 +++++++++++++++-----
 source3/smbd/vfs.c                    |  7 ------
 source3/torture/cmd_vfs.c             |  5 ++++-
 32 files changed, 79 insertions(+), 455 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index be3773965e7..497ec90760e 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -174,13 +174,6 @@ static int skel_mkdirat(vfs_handle_struct *handle,
 	return -1;
 }
 
-static int skel_rmdir(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname)
-{
-	errno = ENOSYS;
-	return -1;
-}
-
 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
 {
 	errno = ENOSYS;
@@ -1061,7 +1054,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
 	.telldir_fn = skel_telldir,
 	.rewind_dir_fn = skel_rewind_dir,
 	.mkdirat_fn = skel_mkdirat,
-	.rmdir_fn = skel_rmdir,
 	.closedir_fn = skel_closedir,
 
 	/* File operations */
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 063af8f3aed..c8277017565 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -175,12 +175,6 @@ static int skel_mkdirat(vfs_handle_struct *handle,
 			mode);
 }
 
-static int skel_rmdir(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname)
-{
-	return SMB_VFS_NEXT_RMDIR(handle, smb_fname);
-}
-
 static int skel_closedir(vfs_handle_struct *handle, DIR *dir)
 {
 	return SMB_VFS_NEXT_CLOSEDIR(handle, dir);
@@ -1357,7 +1351,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
 	.telldir_fn = skel_telldir,
 	.rewind_dir_fn = skel_rewind_dir,
 	.mkdirat_fn = skel_mkdirat,
-	.rmdir_fn = skel_rmdir,
 	.closedir_fn = skel_closedir,
 
 	/* File operations */
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index ea2a29a0758..41621c4e862 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -49,7 +49,6 @@ struct tevent_context;
 	SMBPROFILE_STATS_BASIC(syscall_telldir) \
 	SMBPROFILE_STATS_BASIC(syscall_rewinddir) \
 	SMBPROFILE_STATS_BASIC(syscall_mkdirat) \
-	SMBPROFILE_STATS_BASIC(syscall_rmdir) \
 	SMBPROFILE_STATS_BASIC(syscall_closedir) \
 	SMBPROFILE_STATS_BASIC(syscall_open) \
 	SMBPROFILE_STATS_BASIC(syscall_createfile) \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 326687f5ee1..5ea4f805817 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -283,6 +283,8 @@
 /* Version 42 - Move [un]become_user*() -> [un]become_user_without_service*() */
 /* Version 42 - Move SMB_VFS_UNLINK -> SMB_VFS_UNLINKAT. */
 /* Version 42 - Add SMB_VFS_FCNTL */
+/* Version 42 - Remove SMB_VFS_RMDIR.
+		Use SMB_VFS_UNLINKAT(.., AT_REMOVEDIR) instead. */
 
 #define SMB_VFS_INTERFACE_VERSION 42
 
@@ -716,8 +718,6 @@ struct vfs_fn_pointers {
 			struct files_struct *dirfsp,
 			const struct smb_filename *smb_fname,
 			mode_t mode);
-	int (*rmdir_fn)(struct vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname);
 	int (*closedir_fn)(struct vfs_handle_struct *handle, DIR *dir);
 
 	/* File operations */
@@ -1228,8 +1228,6 @@ int smb_vfs_call_mkdirat(struct vfs_handle_struct *handle,
 			struct files_struct *dirfsp,
 			const struct smb_filename *smb_fname,
 			mode_t mode);
-int smb_vfs_call_rmdir(struct vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname);
 int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
 			  DIR *dir);
 int smb_vfs_call_open(struct vfs_handle_struct *handle,
@@ -1680,8 +1678,6 @@ int vfs_not_implemented_mkdirat(vfs_handle_struct *handle,
 		struct files_struct *dirfsp,
 		const struct smb_filename *smb_fname,
 		mode_t mode);
-int vfs_not_implemented_rmdir(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname);
 int vfs_not_implemented_closedir(vfs_handle_struct *handle, DIR *dir);
 int vfs_not_implemented_open(vfs_handle_struct *handle,
 			     struct smb_filename *smb_fname,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 2dd59711e19..95cf4cf3088 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -114,11 +114,6 @@
 #define SMB_VFS_NEXT_MKDIRAT(handle, dirfsp, smb_fname, mode) \
 	smb_vfs_call_mkdirat((handle)->next,(dirfsp), (smb_fname), (mode))
 
-#define SMB_VFS_RMDIR(conn, smb_fname) \
-	smb_vfs_call_rmdir((conn)->vfs_handles, (smb_fname))
-#define SMB_VFS_NEXT_RMDIR(handle, smb_fname) \
-	smb_vfs_call_rmdir((handle)->next, (smb_fname))
-
 #define SMB_VFS_CLOSEDIR(conn, dir) \
 	smb_vfs_call_closedir((conn)->vfs_handles, dir)
 #define SMB_VFS_NEXT_CLOSEDIR(handle, dir) \
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 6ddb983964e..35dc82ee11d 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1155,7 +1155,10 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
 
 	become_root();
 	if (is_directory) {
-		ret = SMB_VFS_NEXT_RMDIR(handle, &local_fname);
+		ret = SMB_VFS_NEXT_UNLINKAT(handle,
+				conn->cwd_fsp,
+				&local_fname,
+				AT_REMOVEDIR);
 	} else {
 		ret = SMB_VFS_NEXT_UNLINKAT(handle,
 				conn->cwd_fsp,
@@ -1183,12 +1186,16 @@ static int acl_common_remove_object(vfs_handle_struct *handle,
 }
 
 int rmdir_acl_common(struct vfs_handle_struct *handle,
-		     const struct smb_filename *smb_fname)
+		struct files_struct *dirfsp,
+		const struct smb_filename *smb_fname)
 {
 	int ret;
 
 	/* Try the normal rmdir first. */
-	ret = SMB_VFS_NEXT_RMDIR(handle, smb_fname);
+	ret = SMB_VFS_NEXT_UNLINKAT(handle,
+			dirfsp,
+			smb_fname,
+			AT_REMOVEDIR);
 	if (ret == 0) {
 		return 0;
 	}
diff --git a/source3/modules/vfs_acl_common.h b/source3/modules/vfs_acl_common.h
index d36e68c161b..bc2177349d3 100644
--- a/source3/modules/vfs_acl_common.h
+++ b/source3/modules/vfs_acl_common.h
@@ -33,7 +33,8 @@ bool init_acl_common_config(vfs_handle_struct *handle,
 			    const char *module_name);
 
 int rmdir_acl_common(struct vfs_handle_struct *handle,
-		     const struct smb_filename *smb_fname);
+			struct files_struct *dirfsp,
+			const struct smb_filename *smb_fname);
 int unlink_acl_common(struct vfs_handle_struct *handle,
 			struct files_struct *dirfsp,
 			const struct smb_filename *smb_fname,
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 1c58b59f244..41a65891084 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -263,7 +263,9 @@ static int unlinkat_acl_tdb(vfs_handle_struct *handle,
 	}
 
 	if (flags & AT_REMOVEDIR) {
-		ret = rmdir_acl_common(handle, smb_fname_tmp);
+		ret = rmdir_acl_common(handle,
+				dirfsp,
+				smb_fname_tmp);
 	} else {
 		ret = unlink_acl_common(handle,
 				dirfsp,
@@ -280,32 +282,6 @@ static int unlinkat_acl_tdb(vfs_handle_struct *handle,
 	return ret;
 }
 
-/*********************************************************************
- On rmdir we need to delete the tdb record (if using tdb).
-*********************************************************************/
-
-static int rmdir_acl_tdb(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname)
-{
-
-	SMB_STRUCT_STAT sbuf;
-	struct db_context *db = acl_db;
-	int ret = -1;
-
-	ret = vfs_stat_smb_basename(handle->conn, smb_fname, &sbuf);
-	if (ret == -1) {
-		return -1;
-	}
-
-	ret = rmdir_acl_common(handle, smb_fname);
-	if (ret == -1) {
-		return -1;
-	}
-
-	acl_tdb_delete(handle, db, &sbuf);
-	return 0;
-}
-
 /*******************************************************************
  Handle opening the storage tdb if so configured.
 *******************************************************************/
@@ -497,7 +473,6 @@ static NTSTATUS acl_tdb_fset_nt_acl(vfs_handle_struct *handle,
 static struct vfs_fn_pointers vfs_acl_tdb_fns = {
 	.connect_fn = connect_acl_tdb,
 	.disconnect_fn = disconnect_acl_tdb,
-	.rmdir_fn = rmdir_acl_tdb,
 	.unlinkat_fn = unlinkat_acl_tdb,
 	.chmod_fn = chmod_acl_module_common,
 	.fchmod_fn = fchmod_acl_module_common,
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index 890e6b40862..7ac7a8dca60 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -286,7 +286,9 @@ static int acl_xattr_unlinkat(vfs_handle_struct *handle,
 	int ret;
 
 	if (flags & AT_REMOVEDIR) {
-		ret = rmdir_acl_common(handle, smb_fname);
+		ret = rmdir_acl_common(handle,
+				dirfsp,
+				smb_fname);
 	} else {
 		ret = unlink_acl_common(handle,
 				dirfsp,
@@ -334,7 +336,6 @@ static NTSTATUS acl_xattr_fset_nt_acl(vfs_handle_struct *handle,
 
 static struct vfs_fn_pointers vfs_acl_xattr_fns = {
 	.connect_fn = connect_acl_xattr,
-	.rmdir_fn = rmdir_acl_common,
 	.unlinkat_fn = acl_xattr_unlinkat,
 	.chmod_fn = chmod_acl_module_common,
 	.fchmod_fn = fchmod_acl_module_common,
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index 8c6b23e6878..84640b2bfa9 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -214,21 +214,6 @@ static int audit_mkdirat(vfs_handle_struct *handle,
 	return result;
 }
 
-static int audit_rmdir(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname)
-{
-	int result;
-
-	result = SMB_VFS_NEXT_RMDIR(handle, smb_fname);
-
-	syslog(audit_syslog_priority(handle), "rmdir %s %s%s\n", 
-	       smb_fname->base_name,
-	       (result < 0) ? "failed: " : "",
-	       (result < 0) ? strerror(errno) : "");
-
-	return result;
-}
-
 static int audit_open(vfs_handle_struct *handle,
 		      struct smb_filename *smb_fname, files_struct *fsp,
 		      int flags, mode_t mode)
@@ -338,7 +323,6 @@ static struct vfs_fn_pointers vfs_audit_fns = {
 	.disconnect_fn = audit_disconnect,
 	.opendir_fn = audit_opendir,
 	.mkdirat_fn = audit_mkdirat,
-	.rmdir_fn = audit_rmdir,
 	.open_fn = audit_open,
 	.close_fn = audit_close,
 	.renameat_fn = audit_renameat,
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 9b7a855bab3..21465c4f91d 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -169,31 +169,6 @@ static int cap_mkdirat(vfs_handle_struct *handle,
 			mode);
 }
 
-static int cap_rmdir(vfs_handle_struct *handle,
-		const struct smb_filename *smb_fname)
-{
-	char *cappath = capencode(talloc_tos(), smb_fname->base_name);
-	struct smb_filename *cap_smb_fname = NULL;
-
-	if (!cappath) {
-		errno = ENOMEM;
-		return -1;
-	}
-
-	cap_smb_fname = synthetic_smb_fname(talloc_tos(),
-					cappath,
-					NULL,
-					NULL,
-					smb_fname->flags);
-	if (cap_smb_fname == NULL) {
-		TALLOC_FREE(cappath);
-		errno = ENOMEM;
-		return -1;
-	}
-
-	return SMB_VFS_NEXT_RMDIR(handle, cap_smb_fname);
-}
-
 static int cap_open(vfs_handle_struct *handle, struct smb_filename *smb_fname,
 		    files_struct *fsp, int flags, mode_t mode)
 {
@@ -1041,7 +1016,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
 	.opendir_fn = cap_opendir,
 	.readdir_fn = cap_readdir,
 	.mkdirat_fn = cap_mkdirat,
-	.rmdir_fn = cap_rmdir,
 	.open_fn = cap_open,
 	.renameat_fn = cap_renameat,
 	.stat_fn = cap_stat,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index ed79edc23a7..db70060ee2b 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -825,40 +825,6 @@ static int catia_chmod(vfs_handle_struct *handle,
 	return ret;
 }
 
-static int catia_rmdir(vfs_handle_struct *handle,
-		       const struct smb_filename *smb_fname)
-{
-	char *name = NULL;
-	NTSTATUS status;
-	int ret;
-	struct smb_filename *catia_smb_fname = NULL;
-
-	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;
-	}
-	catia_smb_fname = synthetic_smb_fname(talloc_tos(),
-					name,
-					NULL,
-					&smb_fname->st,
-					smb_fname->flags);
-	if (catia_smb_fname == NULL) {
-		TALLOC_FREE(name);
-		errno = ENOMEM;
-		return -1;
-	}
-
-	ret = SMB_VFS_NEXT_RMDIR(handle, catia_smb_fname);
-	TALLOC_FREE(name);
-	TALLOC_FREE(catia_smb_fname);
-
-	return ret;
-}
-
 static int catia_mkdirat(vfs_handle_struct *handle,
 			struct files_struct *dirfsp,
 			const struct smb_filename *smb_fname,
@@ -2442,7 +2408,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
 
 	/* Directory operations */
 	.mkdirat_fn = catia_mkdirat,
-	.rmdir_fn = catia_rmdir,
 	.opendir_fn = catia_opendir,
 	.readdir_attr_fn = catia_readdir_attr,
 
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 6c21005125e..6295d032d10 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -397,17 +397,6 @@ static int cephwrap_mkdirat(struct vfs_handle_struct *handle,
 	return WRAP_RETURN(result);
 }
 
-static int cephwrap_rmdir(struct vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname)
-{
-	int result;
-
-	DBG_DEBUG("[CEPH] rmdir(%p, %s)\n", handle, smb_fname->base_name);
-	result = ceph_rmdir(handle->data, smb_fname->base_name);
-	DBG_DEBUG("[CEPH] rmdir(...) = %d\n", result);
-	WRAP_RETURN(result);
-}
-
 static int cephwrap_closedir(struct vfs_handle_struct *handle, DIR *dirp)
 {
 	int result;
@@ -1442,7 +1431,6 @@ static struct vfs_fn_pointers ceph_fns = {
 	.telldir_fn = cephwrap_telldir,
 	.rewind_dir_fn = cephwrap_rewinddir,
 	.mkdirat_fn = cephwrap_mkdirat,
-	.rmdir_fn = cephwrap_rmdir,
 	.closedir_fn = cephwrap_closedir,
 
 	/* File operations */
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index 3fbb765a5fd..680716fcf98 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -1340,26 +1340,6 @@ static int ceph_snap_gmt_mkdirat(vfs_handle_struct *handle,
 			mode);
 }
 
-static int ceph_snap_gmt_rmdir(vfs_handle_struct *handle,
-				const struct smb_filename *csmb_fname)
-{
-	time_t timestamp = 0;
-	int ret;
-
-	ret = ceph_snap_gmt_strip_snapshot(handle,
-					csmb_fname->base_name,
-					&timestamp, NULL, 0);
-	if (ret < 0) {
-		errno = -ret;
-		return -1;
-	}
-	if (timestamp != 0) {
-		errno = EROFS;
-		return -1;
-	}
-	return SMB_VFS_NEXT_RMDIR(handle, csmb_fname);
-}
-
 static int ceph_snap_gmt_chflags(vfs_handle_struct *handle,
 				const struct smb_filename *csmb_fname,
 				unsigned int flags)
@@ -1653,7 +1633,6 @@ static struct vfs_fn_pointers ceph_snap_fns = {
 	.fget_nt_acl_fn = ceph_snap_gmt_fget_nt_acl,
 	.get_nt_acl_fn = ceph_snap_gmt_get_nt_acl,
 	.mkdirat_fn = ceph_snap_gmt_mkdirat,
-	.rmdir_fn = ceph_snap_gmt_rmdir,
 	.getxattr_fn = ceph_snap_gmt_getxattr,
 	.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
 	.getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 9bf8005bcd7..13d849c5084 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -520,17 +520,6 @@ static int vfswrap_mkdirat(vfs_handle_struct *handle,
 	return result;
 }
 
-static int vfswrap_rmdir(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname)
-{
-	int result;
-
-	START_PROFILE(syscall_rmdir);
-	result = rmdir(smb_fname->base_name);
-	END_PROFILE(syscall_rmdir);
-	return result;
-}
-
 static int vfswrap_closedir(vfs_handle_struct *handle, DIR *dirp)
 {
 	int result;
@@ -3514,7 +3503,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
 	.telldir_fn = vfswrap_telldir,
 	.rewind_dir_fn = vfswrap_rewinddir,
 	.mkdirat_fn = vfswrap_mkdirat,
-	.rmdir_fn = vfswrap_rmdir,
 	.closedir_fn = vfswrap_closedir,
 
 	/* File operations */
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 86968e67f5c..97b072f00de 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -236,27 +236,6 @@ static int audit_mkdirat(vfs_handle_struct *handle,
 	return result;
 }
 
-static int audit_rmdir(vfs_handle_struct *handle,
-			const struct smb_filename *smb_fname)
-{
-	int result;
-
-	result = SMB_VFS_NEXT_RMDIR(handle, smb_fname);
-
-	if (lp_syslog() > 0) {
-		syslog(audit_syslog_priority(handle), "rmdir %s %s%s\n",
-		       smb_fname->base_name,
-		       (result < 0) ? "failed: " : "",
-		       (result < 0) ? strerror(errno) : "");
-	}
-	DEBUG(0, ("vfs_extd_audit: rmdir %s %s %s\n",
-               smb_fname->base_name,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list