summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-09 11:12:52 +0200
committerVolker Lendecke <vl@samba.org>2009-05-09 14:09:41 +0200
commitc291a55a352a8ee09e9e6ac118e3b0c31a9905e8 (patch)
treeeac6028725bc1984a33d6c84aee9d80c30c3ccda /source3
parent5c76472491b813350d01a6398687af0e52fda819 (diff)
downloadsamba-c291a55a352a8ee09e9e6ac118e3b0c31a9905e8.tar.gz
samba-c291a55a352a8ee09e9e6ac118e3b0c31a9905e8.tar.bz2
samba-c291a55a352a8ee09e9e6ac118e3b0c31a9905e8.zip
Do not call SMB_VFS_GET_REAL_FILENAME if the name is mangled
The GPFS get_real_file name does not know about mangled names. Tim, if onefs does not either, you need this bugfix :-) In case onefs does 8.3 names, we need to pass the mangled flag down to SMB_VFS_GET_REAL_FILENAME to give GPFS a chance say ENOTSUPP and do the fallback.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/filename.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 774ab27a74..0d5529b6b0 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -791,16 +791,14 @@ static bool fname_equal(const char *name1, const char *name2,
static int get_real_filename_full_scan(connection_struct *conn,
const char *path, const char *name,
+ bool mangled,
TALLOC_CTX *mem_ctx, char **found_name)
{
struct smb_Dir *cur_dir;
const char *dname;
- bool mangled;
char *unmangled_name = NULL;
long curpos;
- mangled = mangle_is_mangled(name, conn->params);
-
/* handle null paths */
if ((path == NULL) || (*path == 0)) {
path = ".";
@@ -897,6 +895,14 @@ int get_real_filename(connection_struct *conn, const char *path,
char **found_name)
{
int ret;
+ bool mangled;
+
+ mangled = mangle_is_mangled(name, conn->params);
+
+ if (mangled) {
+ return get_real_filename_full_scan(conn, path, name, mangled,
+ mem_ctx, found_name);
+ }
/* Try the vfs first to take advantage of case-insensitive stat. */
ret = SMB_VFS_GET_REAL_FILENAME(conn, path, name, mem_ctx, found_name);
@@ -910,9 +916,8 @@ int get_real_filename(connection_struct *conn, const char *path,
return ret;
}
- ret = get_real_filename_full_scan(conn, path, name, mem_ctx,
- found_name);
- return ret;
+ return get_real_filename_full_scan(conn, path, name, mangled, mem_ctx,
+ found_name);
}
static NTSTATUS build_stream_path(TALLOC_CTX *mem_ctx,