summaryrefslogtreecommitdiff
path: root/examples/VFS
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-02-08 15:07:48 -0800
committerJeremy Allison <jra@samba.org>2011-02-09 00:55:22 +0100
commita674a56a97c78a44bf43f1c175d106fbe70c7485 (patch)
tree78d6bab766e79d4e66de86d94d972cc96bb2a245 /examples/VFS
parent224fc03cb56b0d76f6ad7f18dd0528d6b0e57fb1 (diff)
downloadsamba-a674a56a97c78a44bf43f1c175d106fbe70c7485.tar.gz
samba-a674a56a97c78a44bf43f1c175d106fbe70c7485.tar.bz2
samba-a674a56a97c78a44bf43f1c175d106fbe70c7485.zip
Add fdopendir to the VFS. We will use this to reuse a directory fd already open by NtCreateX.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104
Diffstat (limited to 'examples/VFS')
-rw-r--r--examples/VFS/skel_opaque.c6
-rw-r--r--examples/VFS/skel_transparent.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index e506a2060d..da126e3c0a 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -87,6 +87,11 @@ static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fnam
return NULL;
}
+static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+{
+ return NULL;
+}
+
static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
@@ -784,6 +789,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
/* Directory operations */
.opendir = skel_opendir,
+ .fdopendir = skel_fdopendir,
.readdir = skel_readdir,
.seekdir = skel_seekdir,
.telldir = skel_telldir,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 3ab3b63eaf..0ffdc11b21 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -84,6 +84,11 @@ static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, const char *fnam
return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
}
+static SMB_STRUCT_DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+{
+ return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
+}
+
static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp,
SMB_STRUCT_STAT *sbuf)
@@ -728,6 +733,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
/* Directory operations */
.opendir = skel_opendir,
+ .fdopendir = skel_fdopendir,
.readdir = skel_readdir,
.seekdir = skel_seekdir,
.telldir = skel_telldir,