The Samba-Bugzilla – Attachment 3616 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.42 KB, created by
Jeremy Allison
on 2008-09-23 16:14:58 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2008-09-23 16:14:58 UTC
Size:
1.42 KB
patch
obsolete
>diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c >index 13105dc..f3b45ad 100644 >--- a/source/smbd/trans2.c >+++ b/source/smbd/trans2.c >@@ -1885,7 +1885,7 @@ static void call_trans2findfirst(connection_struct *conn, > bool requires_resume_key; > int info_level; > char *directory = NULL; >- const char *mask = NULL; >+ char *mask = NULL; > char *p; > int last_entry_off=0; > int dptr_num = -1; >@@ -1973,7 +1973,7 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", > return; > } > >- ntstatus = unix_convert(ctx, conn, directory, True, &directory, NULL, &sbuf); >+ ntstatus = unix_convert(ctx, conn, directory, True, &directory, &mask, &sbuf); > if (!NT_STATUS_IS_OK(ntstatus)) { > reply_nterror(req, ntstatus); > return; >@@ -1989,10 +1989,12 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", > if(p == NULL) { > /* Windows and OS/2 systems treat search on the root '\' as if it were '\*' */ > if((directory[0] == '.') && (directory[1] == '\0')) { >- mask = "*"; >+ mask = talloc_strdup(ctx,"*"); >+ if (!mask) { >+ reply_nterror(req, NT_STATUS_NO_MEMORY); >+ return; >+ } > mask_contains_wcard = True; >- } else { >- mask = directory; > } > directory = talloc_strdup(talloc_tos(), "./"); > if (!directory) { >@@ -2000,7 +2002,6 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n", > return; > } > } else { >- mask = p+1; > *p = 0; > } >
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