[SCM] Samba Shared Repository - branch v3-6-test updated
Karolin Seeger
kseeger at samba.org
Wed Oct 2 01:29:23 MDT 2013
The branch, v3-6-test has been updated
via ee0ef2a Fix is_legal_name() to not emit character conversion error messages.
from e00a2c9 s3: smb2 server - fix bug 10167 smb2 breaks "smb encryption = mandatory
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit ee0ef2a5b4b06fdb723a5232f90212fda5e853d1
Author: Jeremy Allison <jra at samba.org>
Date: Thu Sep 12 14:44:58 2013 -0700
Fix is_legal_name() to not emit character conversion error messages.
Using next_codepoint() does the same check, but without the conversion
message.
Signed-off-by: Jeremy Allison <jra at samba.org>
Fix bug #10139 - valid utf8 filenames cause "invalid conversion error" messages.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/mangle_hash2.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c
index 5aafe2f..90d9498 100644
--- a/source3/smbd/mangle_hash2.c
+++ b/source3/smbd/mangle_hash2.c
@@ -626,7 +626,8 @@ static bool is_legal_name(const char *name)
while (*name) {
if (((unsigned int)name[0]) > 128 && (name[1] != 0)) {
/* Possible start of mb character. */
- char mbc[2];
+ size_t size = 0;
+ (void)next_codepoint(name, &size);
/*
* Note that if CH_UNIX is utf8 a string may be 3
* bytes, but this is ok as mb utf8 characters don't
@@ -634,9 +635,9 @@ static bool is_legal_name(const char *name)
* for mb UNIX asian characters like Japanese (SJIS) here.
* JRA.
*/
- if (convert_string(CH_UNIX, CH_UTF16LE, name, 2, mbc, 2, False) == 2) {
- /* Was a good mb string. */
- name += 2;
+ if (size > 1) {
+ /* Was a mb string. */
+ name += size;
continue;
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list