summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorGuenter Kukkukk <kukks@samba.org>2013-02-27 05:50:52 +0100
committerJeremy Allison <jra@samba.org>2013-03-07 11:33:39 -0800
commitf7a63dc3ae784254a289348139d279f87b819ee1 (patch)
tree808540238cff42bb4923e03c74b51d869173e677 /source3/modules
parentbb680efb0a40ecfe86206acef379e5f9e09ea5bf (diff)
downloadsamba-f7a63dc3ae784254a289348139d279f87b819ee1.tar.gz
samba-f7a63dc3ae784254a289348139d279f87b819ee1.tar.bz2
samba-f7a63dc3ae784254a289348139d279f87b819ee1.zip
vfs_catia: fix the translation to "vfs_translate_to_windows"
THANKS to an IRC user (Raimund ?) who asked for a char mapping possibility. I suggested vfs_catia - but it did not work! Hopefully now it will. :-) Signed-off-by: Guenter Kukkukk <kukks@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_catia.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 3140df97f9..145f384b3b 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -300,7 +300,7 @@ static NTSTATUS catia_translate_name(struct vfs_handle_struct *handle,
{
char *name = NULL;
char *mapped_name;
- NTSTATUS ret;
+ NTSTATUS status, ret;
/*
* Copy the supplied name and free the memory for mapped_name,
@@ -313,12 +313,12 @@ static NTSTATUS catia_translate_name(struct vfs_handle_struct *handle,
errno = ENOMEM;
return NT_STATUS_NO_MEMORY;
}
- ret = catia_string_replace_allocate(handle->conn, name,
+ status = catia_string_replace_allocate(handle->conn, name,
&mapped_name, direction);
TALLOC_FREE(name);
- if (!NT_STATUS_IS_OK(ret)) {
- return ret;
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
}
ret = SMB_VFS_NEXT_TRANSLATE_NAME(handle, mapped_name, direction,
@@ -326,6 +326,8 @@ static NTSTATUS catia_translate_name(struct vfs_handle_struct *handle,
if (NT_STATUS_EQUAL(ret, NT_STATUS_NONE_MAPPED)) {
*pmapped_name = talloc_move(mem_ctx, &mapped_name);
+ /* we need to return the former translation result here */
+ ret = status;
} else {
TALLOC_FREE(mapped_name);
}