The Samba-Bugzilla – Attachment 3615 Details for
Bug 5783
FindFirst fails where search pattern == mangled filename
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
look (text/plain), 1.39 KB, created by
Jeremy Allison
on 2008-09-23 15:32:20 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2008-09-23 15:32:20 UTC
Size:
1.39 KB
patch
obsolete
>diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c >index 13105dc..67b6252 100644 >--- a/source/smbd/trans2.c >+++ b/source/smbd/trans2.c >@@ -1267,6 +1267,7 @@ static bool get_lanman2_dir_entry(TALLOC_CTX *ctx, > uint32 nt_extmode; /* Used for NT connections instead of mode */ > bool needslash = ( conn->dirpath[strlen(conn->dirpath) -1] != '/'); > bool check_mangled_names = lp_manglednames(conn->params); >+ bool mask_is_illegal_name = false; > char mangled_name[13]; /* mangled 8.3 name. */ > > *out_of_space = False; >@@ -1291,6 +1292,15 @@ static bool get_lanman2_dir_entry(TALLOC_CTX *ctx, > mask = path_mask; > } > >+ /* If the mask contains illegal characters >+ we should disable the mangle checking, we'll >+ never match a mangled name. */ >+ >+ if (mangle_must_mangle(mask,conn->params)) { >+ mask_is_illegal_name = true; >+ check_mangled_names = false; >+ } >+ > while (!found) { > bool got_match; > bool ms_dfs_link = False; >@@ -1324,8 +1334,9 @@ static bool get_lanman2_dir_entry(TALLOC_CTX *ctx, > pathreal = NULL; > fname = dname; > >- /* Mangle fname if it's an illegal name. */ >- if (mangle_must_mangle(dname,conn->params)) { >+ /* Mangle fname if it's an illegal name and mask is not >+ an illegal name. */ >+ if (!mask_is_illegal_name && mangle_must_mangle(dname,conn->params)) { > if (!name_to_8_3(dname,mangled_name,True,conn->params)) { > continue; /* Error - couldn't mangle. */ > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5783
:
3615
|
3616