summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_netatalk.c
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 /source3/modules/vfs_netatalk.c
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 'source3/modules/vfs_netatalk.c')
-rw-r--r--source3/modules/vfs_netatalk.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c
index d5a85b3390..734c603618 100644
--- a/source3/modules/vfs_netatalk.c
+++ b/source3/modules/vfs_netatalk.c
@@ -198,6 +198,31 @@ static SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const cha
return ret;
}
+static SMB_STRUCT_DIR *atalk_fdopendir(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attr)
+{
+ SMB_STRUCT_DIR *ret = 0;
+
+ ret = SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
+
+ if (ret == NULL) {
+ return ret;
+ }
+
+ /*
+ * when we try to perform delete operation upon file which has fork
+ * in ./.AppleDouble and this directory wasn't hidden by Samba,
+ * MS Windows explorer causes the error: "Cannot find the specified file"
+ * There is some workaround to avoid this situation, i.e. if
+ * connection has not .AppleDouble entry in either veto or hide
+ * list then it would be nice to add one.
+ */
+
+ atalk_add_to_list(&handle->conn->hide_list);
+ atalk_add_to_list(&handle->conn->veto_list);
+
+ return ret;
+}
+
static int atalk_rmdir(struct vfs_handle_struct *handle, const char *path)
{
bool add = False;
@@ -432,6 +457,7 @@ exit_lchown:
static struct vfs_fn_pointers vfs_netatalk_fns = {
.opendir = atalk_opendir,
+ .fdopendir = atalk_fdopendir,
.rmdir = atalk_rmdir,
.rename = atalk_rename,
.unlink = atalk_unlink,