[SCM] Samba Shared Repository - branch master updated -
release-4-0-0alpha7-1522-gefbc431
Volker Lendecke
vlendec at samba.org
Sat May 9 12:10:34 GMT 2009
The branch, master has been updated
via efbc4315d22f5b2c255c723dd1a18bbbb0c300b8 (commit)
via c291a55a352a8ee09e9e6ac118e3b0c31a9905e8 (commit)
from 5c76472491b813350d01a6398687af0e52fda819 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit efbc4315d22f5b2c255c723dd1a18bbbb0c300b8
Author: Volker Lendecke <vl at samba.org>
Date: Sat May 9 13:46:08 2009 +0200
Fix the mangle1 test
commit c291a55a352a8ee09e9e6ac118e3b0c31a9905e8
Author: Volker Lendecke <vl at samba.org>
Date: Sat May 9 11:12:52 2009 +0200
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.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/filename.c | 17 +++++++++++------
source3/torture/torture.c | 2 +-
2 files changed, 12 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 774ab27..0d5529b 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,
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 1d46346..53a39c6 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -5065,7 +5065,7 @@ static bool run_mangle1(int dummy)
cli_sockopt(cli, sockops);
- if (NT_STATUS_IS_OK(cli_ntcreate(
+ if (!NT_STATUS_IS_OK(cli_ntcreate(
cli, fname, 0, GENERIC_ALL_ACCESS|DELETE_ACCESS,
FILE_ATTRIBUTE_NORMAL, 0, FILE_OVERWRITE_IF, 0, 0, &fnum))) {
d_printf("open %s failed: %s\n", fname, cli_errstr(cli));
--
Samba Shared Repository
More information about the samba-cvs
mailing list