summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/VFS/skel_opaque.c8
-rw-r--r--examples/VFS/skel_transparent.c7
-rw-r--r--source3/include/smbprofile.h1
-rw-r--r--source3/include/vfs.h8
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/modules/vfs_default.c12
-rw-r--r--source3/modules/vfs_not_implemented.c8
-rw-r--r--source3/smbd/vfs.c7
8 files changed, 2 insertions, 54 deletions
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_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_not_implemented.c b/source3/modules/vfs_not_implemented.c
index 2b906b3cf28..083ebc9e1f1 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -171,13 +171,6 @@ int vfs_not_implemented_mkdirat(vfs_handle_struct *handle,
return -1;
}
-int vfs_not_implemented_rmdir(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname)
-{
- errno = ENOSYS;
- return -1;
-}
-
int vfs_not_implemented_closedir(vfs_handle_struct *handle, DIR *dir)
{
errno = ENOSYS;
@@ -1066,7 +1059,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
.telldir_fn = vfs_not_implemented_telldir,
.rewind_dir_fn = vfs_not_implemented_rewind_dir,
.mkdirat_fn = vfs_not_implemented_mkdirat,
- .rmdir_fn = vfs_not_implemented_rmdir,
.closedir_fn = vfs_not_implemented_closedir,
/* File operations */
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 5332f00e876..34923b62ab4 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1623,13 +1623,6 @@ int smb_vfs_call_mkdirat(struct vfs_handle_struct *handle,
mode);
}
-int smb_vfs_call_rmdir(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname)
-{
- VFS_FIND(rmdir);
- return handle->fns->rmdir_fn(handle, smb_fname);
-}
-
int smb_vfs_call_closedir(struct vfs_handle_struct *handle,
DIR *dir)
{