The Samba-Bugzilla – Attachment 6472 Details for
Bug 8150
Ban 'dos charset = utf8'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixed patch for 3.6
0001-lib-util-charset-Don-t-allow-invalid-dos-charset-utf.patch (text/plain), 1.77 KB, created by
Andrew Bartlett
on 2011-05-23 02:35:17 UTC
(
hide
)
Description:
Fixed patch for 3.6
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2011-05-23 02:35:17 UTC
Size:
1.77 KB
patch
obsolete
>From fa2f7d60462bab8c268fc5921b80861d85534771 Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Mon, 23 May 2011 12:34:16 +1000 >Subject: [PATCH] lib/util/charset Don't allow invalid 'dos charset = utf8' > >No DOS client used UTF8, and this creates subtle, difficult to >disagnose breakage of schannel (domain membership). > >Andrew Bartlett >--- > lib/util/charset/codepoints.c | 5 +++++ > source3/utils/testparm.c | 5 +++++ > 2 files changed, 10 insertions(+), 0 deletions(-) > >diff --git a/lib/util/charset/codepoints.c b/lib/util/charset/codepoints.c >index 5ee95a8..aceacb6 100644 >--- a/lib/util/charset/codepoints.c >+++ b/lib/util/charset/codepoints.c >@@ -281,6 +281,11 @@ _PUBLIC_ struct smb_iconv_convenience *smb_iconv_convenience_reinit(TALLOC_CTX * > > talloc_set_destructor(ret, close_iconv_convenience); > >+ if (strcasecmp(dos_charset, "UTF8") == 0 || strcasecmp(dos_charset, "UTF-8") == 0) { >+ DEBUG(0,("ERROR: invalid DOS charset: 'dos charset' must not be UTF8, using (default value) CP850 instead\n")); >+ dos_charset = "CP850"; >+ } >+ > ret->dos_charset = talloc_strdup(ret->child_ctx, dos_charset); > ret->unix_charset = talloc_strdup(ret->child_ctx, unix_charset); > ret->display_charset = talloc_strdup(ret->child_ctx, display_charset); >diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c >index 978ada2..9a484b6 100644 >--- a/source3/utils/testparm.c >+++ b/source3/utils/testparm.c >@@ -246,6 +246,11 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ > fprintf(stderr,"WARNING: Maximum value for 'os level' is 255!\n"); > } > >+ if (strequal(lp_dos_charset(), "UTF8") || strequal(lp_dos_charset(), "UTF-8")) { >+ fprintf(stderr, "ERROR: 'dos charset' must not be UTF8\n"); >+ ret = 1; >+ } >+ > return ret; > } > >-- >1.7.4.4 >
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:
jra
:
review-
Actions:
View
Attachments on
bug 8150
:
6454
|
6472
|
6476