summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/VFS/skel_opaque.c9
-rw-r--r--examples/VFS/skel_transparent.c8
-rw-r--r--source3/include/smbprofile.h1
-rw-r--r--source3/include/vfs.h11
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/modules/vfs_default.c25
-rw-r--r--source3/modules/vfs_not_implemented.c9
-rw-r--r--source3/smbd/vfs.c8
8 files changed, 1 insertions, 75 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index a4bfe81966b..c03a42fee04 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -165,14 +165,6 @@ static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
;
}
-static int skel_mkdir(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- errno = ENOSYS;
- return -1;
-}
-
static int skel_mkdirat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
@@ -1059,7 +1051,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.seekdir_fn = skel_seekdir,
.telldir_fn = skel_telldir,
.rewind_dir_fn = skel_rewind_dir,
- .mkdir_fn = skel_mkdir,
.mkdirat_fn = skel_mkdirat,
.rmdir_fn = skel_rmdir,
.closedir_fn = skel_closedir,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index b827d2ff77c..656c933338a 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -164,13 +164,6 @@ static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
SMB_VFS_NEXT_REWINDDIR(handle, dirp);
}
-static int skel_mkdir(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- return SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode);
-}
-
static int skel_mkdirat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
@@ -1343,7 +1336,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.seekdir_fn = skel_seekdir,
.telldir_fn = skel_telldir,
.rewind_dir_fn = skel_rewind_dir,
- .mkdir_fn = skel_mkdir,
.mkdirat_fn = skel_mkdirat,
.rmdir_fn = skel_rmdir,
.closedir_fn = skel_closedir,
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index e1b933ea2dd..489a613e3df 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -48,7 +48,6 @@ struct tevent_context;
SMBPROFILE_STATS_BASIC(syscall_seekdir) \
SMBPROFILE_STATS_BASIC(syscall_telldir) \
SMBPROFILE_STATS_BASIC(syscall_rewinddir) \
- SMBPROFILE_STATS_BASIC(syscall_mkdir) \
SMBPROFILE_STATS_BASIC(syscall_mkdirat) \
SMBPROFILE_STATS_BASIC(syscall_rmdir) \
SMBPROFILE_STATS_BASIC(syscall_closedir) \
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 9ecc0e55497..d164e91e886 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -277,7 +277,7 @@
/* Version 42 - Move SMB_VFS_MKNOD -> SMB_VFS_MKDNODAT. */
/* Version 42 - Move SMB_VFS_READLINK -> SMB_VFS_READLINKAT. */
/* Version 42 - Move SMB_VFS_SYMLINK -> SMB_VFS_SYMLINKAT. */
-/* Version 42 - Add SMB_VFS_MKDIRAT. */
+/* Version 42 - Move SMB_VFS_MKDIR -> SMB_VFS_MKDIRAT. */
#define SMB_VFS_INTERFACE_VERSION 42
@@ -699,9 +699,6 @@ struct vfs_fn_pointers {
void (*seekdir_fn)(struct vfs_handle_struct *handle, DIR *dirp, long offset);
long (*telldir_fn)(struct vfs_handle_struct *handle, DIR *dirp);
void (*rewind_dir_fn)(struct vfs_handle_struct *handle, DIR *dirp);
- int (*mkdir_fn)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode);
int (*mkdirat_fn)(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
@@ -1210,9 +1207,6 @@ long smb_vfs_call_telldir(struct vfs_handle_struct *handle,
DIR *dirp);
void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
DIR *dirp);
-int smb_vfs_call_mkdir(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode);
int smb_vfs_call_mkdirat(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
@@ -1661,9 +1655,6 @@ struct dirent *vfs_not_implemented_readdir(vfs_handle_struct *handle,
void vfs_not_implemented_seekdir(vfs_handle_struct *handle, DIR *dirp, long offset);
long vfs_not_implemented_telldir(vfs_handle_struct *handle, DIR *dirp);
void vfs_not_implemented_rewind_dir(vfs_handle_struct *handle, DIR *dirp);
-int vfs_not_implemented_mkdir(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode);
int vfs_not_implemented_mkdirat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index a093a08ee11..6d95d840e25 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -109,11 +109,6 @@
#define SMB_VFS_NEXT_REWINDDIR(handle, dirp) \
smb_vfs_call_rewind_dir((handle)->next, (dirp))
-#define SMB_VFS_MKDIR(conn, smb_fname, mode) \
- smb_vfs_call_mkdir((conn)->vfs_handles,(smb_fname), (mode))
-#define SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode) \
- smb_vfs_call_mkdir((handle)->next,(smb_fname), (mode))
-
#define SMB_VFS_MKDIRAT(conn, dirfsp, smb_fname, mode) \
smb_vfs_call_mkdirat((conn)->vfs_handles,(dirfsp), (smb_fname), (mode))
#define SMB_VFS_NEXT_MKDIRAT(handle, dirfsp, smb_fname, mode) \
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 2e353e5da75..4cca80ea397 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -493,30 +493,6 @@ static void vfswrap_rewinddir(vfs_handle_struct *handle, DIR *dirp)
END_PROFILE(syscall_rewinddir);
}
-static int vfswrap_mkdir(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- int result;
- const char *path = smb_fname->base_name;
- char *parent = NULL;
-
- START_PROFILE(syscall_mkdir);
-
- if (lp_inherit_acls(SNUM(handle->conn))
- && parent_dirname(talloc_tos(), path, &parent, NULL)
- && directory_has_default_acl(handle->conn, parent)) {
- mode = (0777 & lp_directory_mask(SNUM(handle->conn)));
- }
-
- TALLOC_FREE(parent);
-
- result = mkdir(path, mode);
-
- END_PROFILE(syscall_mkdir);
- return result;
-}
-
static int vfswrap_mkdirat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
@@ -3486,7 +3462,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.seekdir_fn = vfswrap_seekdir,
.telldir_fn = vfswrap_telldir,
.rewind_dir_fn = vfswrap_rewinddir,
- .mkdir_fn = vfswrap_mkdir,
.mkdirat_fn = vfswrap_mkdirat,
.rmdir_fn = vfswrap_rmdir,
.closedir_fn = vfswrap_closedir,
diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c
index 9fa143a6729..e0f36b9a632 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -162,14 +162,6 @@ void vfs_not_implemented_rewind_dir(vfs_handle_struct *handle, DIR *dirp)
;
}
-int vfs_not_implemented_mkdir(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- errno = ENOSYS;
- return -1;
-}
-
int vfs_not_implemented_mkdirat(vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
@@ -1063,7 +1055,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
.seekdir_fn = vfs_not_implemented_seekdir,
.telldir_fn = vfs_not_implemented_telldir,
.rewind_dir_fn = vfs_not_implemented_rewind_dir,
- .mkdir_fn = vfs_not_implemented_mkdir,
.mkdirat_fn = vfs_not_implemented_mkdirat,
.rmdir_fn = vfs_not_implemented_rmdir,
.closedir_fn = vfs_not_implemented_closedir,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 836fcf41e65..ddc7df1405b 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1580,14 +1580,6 @@ void smb_vfs_call_rewind_dir(struct vfs_handle_struct *handle,
handle->fns->rewind_dir_fn(handle, dirp);
}
-int smb_vfs_call_mkdir(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- VFS_FIND(mkdir);
- return handle->fns->mkdir_fn(handle, smb_fname, mode);
-}
-
int smb_vfs_call_mkdirat(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,