The Samba-Bugzilla – Attachment 5410 Details for
Bug 5128
readdir returns wrong names in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-s3-mangle_hash2.c-Check-if-the-file-to-mangle-is-a-l.patch (text/plain), 1.16 KB, created by
Holger Hetterich
on 2010-02-21 15:05:38 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Holger Hetterich
Created:
2010-02-21 15:05:38 UTC
Size:
1.16 KB
patch
obsolete
>From 3efc9d43193b5656eb0731bfb08b1d2dbe11017f Mon Sep 17 00:00:00 2001 >From: Holger Hetterich <hhetter@novell.com> >Date: Sun, 21 Feb 2010 21:59:32 +0100 >Subject: [PATCH] s3: mangle_hash2.c: Check if the file to mangle is a legal long filename. > >This prevents illegal long filenames like "john \"ripper\" doe" >from being mangled and made visible to the clients. >--- > source3/smbd/mangle_hash2.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c >index b9e7d63..382baee 100644 >--- a/source3/smbd/mangle_hash2.c >+++ b/source3/smbd/mangle_hash2.c >@@ -518,11 +518,14 @@ static bool hash2_name_to_8_3(const char *name, > unsigned int prefix_len; > unsigned int hash, v; > >+ /* check if the file is a legal long filename */ >+ if (!is_legal_name(name)) return False; >+ > /* reserved names are handled specially */ > if (!is_reserved_name(name)) { > /* if the name is already a valid 8.3 name then we don't need to > * change anything */ >- if (is_legal_name(name) && is_8_3(name, False, False, p)) { >+ if (is_8_3(name, False, False, p)) { > safe_strcpy(new_name, name, 12); > return True; > } >-- >1.6.4.2 >
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
Flags:
hhetter
:
review?
(
jra
)
Actions:
View
Attachments on
bug 5128
:
3023
| 5410 |
5411