summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_onefs.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-09 22:46:59 -0700
committerJeremy Allison <jra@samba.org>2009-04-09 22:46:59 -0700
commit7f10bf980edef3ace1522d0c9c082b35e225c950 (patch)
treed4e9af21de194cca812e754b28f9358a3651f4ce /source3/modules/vfs_onefs.c
parentf8f68703da58cf7f61b655b48bbbc45cda647748 (diff)
parentf930f504e1d5e78d2f6f36cab9ce36dbeb34e955 (diff)
downloadsamba-7f10bf980edef3ace1522d0c9c082b35e225c950.tar.gz
samba-7f10bf980edef3ace1522d0c9c082b35e225c950.tar.bz2
samba-7f10bf980edef3ace1522d0c9c082b35e225c950.zip
Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba
Diffstat (limited to 'source3/modules/vfs_onefs.c')
-rw-r--r--source3/modules/vfs_onefs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index ad59c2b32d..e4a0febbec 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -153,10 +153,21 @@ static int onefs_get_real_filename(vfs_handle_struct *handle, const char *path,
char **found_name)
{
SMB_STRUCT_STAT sb;
+ struct connection_struct *conn = handle->conn;
struct stat_extra se;
int result;
+ char *unmangled_name = NULL;
char *full_name = NULL;
+ /* First demangle the name if necessary. */
+ if (!conn->case_sensitive && mangle_is_mangled(name, conn->params) &&
+ mangle_lookup_name_from_8_3(mem_ctx, name, &unmangled_name,
+ conn->params)) {
+ /* Name is now unmangled. */
+ name = unmangled_name;
+ }
+
+ /* Do the case insensitive stat. */
ZERO_STRUCT(se);
se.se_version = ESTAT_CURRENT_VERSION;
se.se_flags = ESTAT_CASE_INSENSITIVE | ESTAT_SYMLINK_NOFOLLOW;
@@ -184,6 +195,7 @@ static int onefs_get_real_filename(vfs_handle_struct *handle, const char *path,
done:
TALLOC_FREE(full_name);
+ TALLOC_FREE(unmangled_name);
return result;
}