summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-09-04 12:20:46 -0700
committerRalph Boehme <slow@samba.org>2019-09-11 18:24:28 +0000
commitca3bc7809949c593fd545047a898348d2f5c4da4 (patch)
tree37e4c8e2a1f616ed4a043616ab1951dfe52676ed /examples
parent5e7828faf3b76c82781e8707d7d7ef990224bd7e (diff)
downloadsamba-ca3bc7809949c593fd545047a898348d2f5c4da4.tar.gz
s3: VFS: Add SMB_VFS_MKDIRAT().
Currently identical to SMB_VFS_MKDIR(). Next, add to all VFS modules that implement mkdir and eventually remove mkdir. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c10
-rw-r--r--examples/VFS/skel_transparent.c12
2 files changed, 22 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 5a18268e6f4..a4bfe81966b 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -173,6 +173,15 @@ static int skel_mkdir(vfs_handle_struct *handle,
return -1;
}
+static int skel_mkdirat(vfs_handle_struct *handle,
+ struct files_struct *dirfsp,
+ const struct smb_filename *smb_fname,
+ mode_t mode)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
static int skel_rmdir(vfs_handle_struct *handle,
const struct smb_filename *smb_fname)
{
@@ -1051,6 +1060,7 @@ static struct vfs_fn_pointers skel_opaque_fns = {
.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 654c0e6ca85..b827d2ff77c 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -171,6 +171,17 @@ static int skel_mkdir(vfs_handle_struct *handle,
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,
+ mode_t mode)
+{
+ return SMB_VFS_NEXT_MKDIRAT(handle,
+ dirfsp,
+ smb_fname,
+ mode);
+}
+
static int skel_rmdir(vfs_handle_struct *handle,
const struct smb_filename *smb_fname)
{
@@ -1333,6 +1344,7 @@ static struct vfs_fn_pointers skel_transparent_fns = {
.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,