From 637901c24288740d51f28e2378c02d956dd7b17d Mon Sep 17 00:00:00 2001 From: Aravind Srinivasan Date: Thu, 3 Sep 2009 20:46:10 +0000 Subject: 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 --- source3/smbd/vfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 42ff8b19cd..9b2df42c58 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -677,7 +677,8 @@ char *vfs_readdirname(connection_struct *conn, void *p, SMB_STRUCT_STAT *sbuf) errno = ENOMEM; return NULL; } - result = SMB_VFS_TRANSLATE_NAME(conn, &dname); + result = SMB_VFS_TRANSLATE_NAME(conn, &dname, + vfs_translate_to_windows); if (!NT_STATUS_IS_OK(result)) { TALLOC_FREE(dname); return NULL; @@ -1506,10 +1507,11 @@ void smb_vfs_call_strict_unlock(struct vfs_handle_struct *handle, } NTSTATUS smb_vfs_call_translate_name(struct vfs_handle_struct *handle, - char **mapped_name) + char **mapped_name, + enum vfs_translate_direction direction) { VFS_FIND(translate_name); - return handle->fns->translate_name(handle, mapped_name); + return handle->fns->translate_name(handle, mapped_name, direction); } NTSTATUS smb_vfs_call_fget_nt_acl(struct vfs_handle_struct *handle, -- cgit