summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAravind Srinivasan <aravind.srinivasan@isilon.com>2009-09-03 20:46:10 +0000
committerTim Prouty <tprouty@samba.org>2009-09-24 10:59:33 -0700
commit637901c24288740d51f28e2378c02d956dd7b17d (patch)
tree2d5dca7fa68bb1f0959c136cbddf1cdeafc3a229 /source3/include
parentc870043b27dff10010e45358d924cbdd688f6555 (diff)
downloadsamba-637901c24288740d51f28e2378c02d956dd7b17d.tar.gz
samba-637901c24288740d51f28e2378c02d956dd7b17d.tar.bz2
samba-637901c24288740d51f28e2378c02d956dd7b17d.zip
vfs catia: Fix the double translation that was happening with createfile and open.
Since the catia translation is implemented for open, it should not also be done in createfile. By removing createfile from catia, translation is now done correctly for the primary open path. In order to support systems that have custom createfile implementations that don't eventually call SMB_VFS_OPEN, SMB_VFS_TRANSLATE_NAME has been expanded to take an additional argument that specifies direction. Signed-off-by: Tim Prouty <tprouty@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/vfs.h11
-rw-r--r--source3/include/vfs_macros.h8
2 files changed, 13 insertions, 6 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 38d60a0aec..ed49d1fd28 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -158,6 +158,11 @@ struct smb_filename;
handle = handle->next; \
}
+enum vfs_translate_direction {
+ vfs_translate_to_unix = 0,
+ vfs_translate_to_windows
+};
+
/*
Available VFS operations. These values must be in sync with vfs_ops struct
(struct vfs_fn_pointers and struct vfs_handle_pointers inside of struct vfs_ops).
@@ -302,7 +307,8 @@ struct vfs_fn_pointers {
struct lock_struct *plock);
NTSTATUS (*translate_name)(struct vfs_handle_struct *handle,
- char **mapped_name);
+ char **mapped_name,
+ enum vfs_translate_direction direction);
/* NT ACL operations. */
@@ -650,7 +656,8 @@ void smb_vfs_call_strict_unlock(struct vfs_handle_struct *handle,
struct files_struct *fsp,
struct lock_struct *plock);
NTSTATUS smb_vfs_call_translate_name(struct vfs_handle_struct *handle,
- char **mapped_name);
+ char **mapped_name,
+ enum vfs_translate_direction direction);
NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32 security_info,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 7cc5579e25..8ca7f373bf 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -345,10 +345,10 @@
#define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) \
smb_vfs_call_strict_unlock((handle)->next, (fsp), (plock))
-#define SMB_VFS_TRANSLATE_NAME(conn, mapped_name) \
- smb_vfs_call_translate_name((conn)->vfs_handles, (mapped_name))
-#define SMB_VFS_NEXT_TRANSLATE_NAME(handle, mapped_name) \
- smb_vfs_call_translate_name((handle)->next, (mapped_name))
+#define SMB_VFS_TRANSLATE_NAME(conn, mapped_name, direction) \
+ smb_vfs_call_translate_name((conn)->vfs_handles, (mapped_name), (direction))
+#define SMB_VFS_NEXT_TRANSLATE_NAME(handle, mapped_name, direction) \
+ smb_vfs_call_translate_name((handle)->next, (mapped_name), (direction))
#define SMB_VFS_NEXT_STRICT_UNLOCK(handle, fsp, plock) \
smb_vfs_call_strict_unlock((handle)->next, (fsp), (plock))