[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Jun 23 06:57:02 MDT 2011


The branch, master has been updated
       via  a73abc0 build: Add a script to install python and Samba with one command
       via  734e1b6 s3-param Remove 'announce version' parameter
       via  38b5beb param: Remove "announce as" parameter
       via  4d2c56c s3-net: Bind our gettext results to 'unix charset'
       via  fb3d5ad s3-swat Remove d_printf() calls
       via  de0e011 lib/util/charset: Remove autodetection of charset from LOCALE
       via  125a2ff lib/util/charset: Remove 'display charset'
      from  6c3cef7 s3: Add IO_REPARSE_TAG_SYMLINK define

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a73abc0403b8267eeb15f9d5f394109495d1b667
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jun 23 20:43:16 2011 +1000

    build: Add a script to install python and Samba with one command
    
    This should help folks on systems that don't have a recent python
    provided by the OS.
    
    Python is installed into the same prefix as Samba, not in the default
    path.
    
    Andrew Bartlett
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Thu Jun 23 14:56:54 CEST 2011 on sn-devel-104

commit 734e1b6812b672fc7d838e943b14b8a176552734
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Jun 21 15:14:29 2011 +1000

    s3-param Remove 'announce version' parameter
    
    The only users I can find of this on the internet involve confused
    users, and our own documentation recommends never setting this.  Don't
    confuse our users any longer.
    
    Andrew Bartlett

commit 38b5beb33d78fd6a799fa591e29e5e1227adfa70
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Jun 21 10:20:05 2011 +1000

    param: Remove "announce as" parameter

commit 4d2c56c4b1a4f846b44f24c6f73e1b95fdf3a9bb
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jun 22 10:40:26 2011 +1000

    s3-net: Bind our gettext results to 'unix charset'
    
    This ensures that the translations and any embedded strings are in the
    same charset.  It won't be the one from the user's locale (we no
    longer auto-detect that), but it will be self-consistent.
    
    Thanks to Steve Langasek for pointing this function out!
    
    Andrew Bartlett

commit fb3d5ade9d3f935a69834aaee0046a54dbf38ca1
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jun 22 10:12:39 2011 +1000

    s3-swat Remove d_printf() calls
    
    These calls only ever output ASCII strings (protocol strings and
    debugging), and never user content, so make it clear that these don't
    need to be converted into UTF8.
    
    Andrew Bartlett

commit de0e0119447060c64f4531c031e5509de3afc1b5
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jun 22 09:58:59 2011 +1000

    lib/util/charset: Remove autodetection of charset from LOCALE
    
    In the past, our LOCALE would set the display charset of Samba.  The
    display charset has now been removed.  This patch removes the support
    code that detected the locale from the environment.  We cannot safely
    have 'unix charset' follow the locale (at it creates files on disk and
    entries in databases that must not vary), so this code is unused.
    
    As an example, imagine a database is manipulated in the
    administrator's locale, and then read by smbd starting up in the
    system default locale.  Or smbd restarted by the administrator rather
    than a startup script.  Both of these situations could corrupt
    databases or filenames on disk.
    
    Andrew Bartlett

commit 125a2ff262aa312df20eec68802fd5f8a47f492f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jun 22 09:52:31 2011 +1000

    lib/util/charset: Remove 'display charset'
    
    As discussed in 'CH_DISPLAY and gettext' on the samba-technical list:
    http://lists.samba.org/archive/samba-technical/2011-June/078190.html
    
    Setting this to a value other than 'unix charset' does not make sense,
    as any system where the filesytem charset does not equal the terminal
    charset will already have problems with programs as simple as 'ls'.
    It also means that our output could not be pasted as our input in
    interactive programs or onto our command line, as we never did
    translate in the DISPLAY -> UNIX direction.
    
    The d_printf() calls are retained in case we need to revisit this, and
    to support display_set_stderr().
    
    Andrew Bartlett

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/smbdotconf/protocol/announceas.xml      |   21 ----
 docs-xml/smbdotconf/protocol/announceversion.xml |   14 ---
 install_with_python.sh                           |   41 +++++++
 lib/util/charset/charset.h                       |    6 +-
 lib/util/charset/codepoints.c                    |   43 +-------
 lib/util/charset/tests/convert_string.c          |  110 +++++++++---------
 lib/util/charset/util_str.c                      |    1 -
 lib/util/dprintf.c                               |   35 +------
 librpc/ndr/ndr_string.c                          |    1 -
 source3/build/charset.py                         |   10 --
 source3/configure.in                             |   23 +----
 source3/include/proto.h                          |    3 -
 source3/include/smb.h                            |    4 +-
 source3/lib/netapi/serverinfo.c                  |    4 +-
 source3/nmbd/nmbd_sendannounce.c                 |    8 +-
 source3/param/loadparm.c                         |  131 +---------------------
 source3/param/loadparm_ctx.c                     |    1 -
 source3/registry/reg_backend_current_version.c   |    4 +-
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c        |    8 +-
 source3/rpc_server/wkssvc/srv_wkssvc_nt.c        |   12 +-
 source3/smbd/lanman.c                            |    4 +-
 source3/utils/net.c                              |   10 ++
 source3/web/cgi.c                                |    4 +-
 source3/wscript                                  |    6 +-
 source4/param/loadparm.c                         |   13 --
 source4/param/param.h                            |    7 -
 source4/param/util.c                             |    1 -
 source4/rpc_server/common/server_info.c          |   18 +---
 28 files changed, 147 insertions(+), 396 deletions(-)
 delete mode 100644 docs-xml/smbdotconf/protocol/announceas.xml
 delete mode 100644 docs-xml/smbdotconf/protocol/announceversion.xml
 create mode 100644 install_with_python.sh


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/protocol/announceas.xml b/docs-xml/smbdotconf/protocol/announceas.xml
deleted file mode 100644
index 8891496..0000000
--- a/docs-xml/smbdotconf/protocol/announceas.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<samba:parameter name="announce as"
-                 context="G"
-				 type="string"
-                 developer="1"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
-<description>
-    <para>This specifies what type of server <citerefentry><refentrytitle>nmbd</refentrytitle>
-    <manvolnum>8</manvolnum></citerefentry> will announce itself as, to a network neighborhood browse 
-    list. By default this is set to Windows NT. The valid options 
-    are : "NT Server" (which can also be written as "NT"), 
-    "NT Workstation", "Win95" or "WfW" meaning Windows NT Server, 
-    Windows NT Workstation, Windows 95 and Windows for Workgroups 
-    respectively. Do not change this parameter unless you have a 
-    specific need to stop Samba appearing as an NT server as this 
-    may prevent Samba servers from participating as browser servers 
-	correctly.</para>
-</description>
-
-<value type="default">NT Server</value>
-<value type="example">Win95</value>
-</samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/announceversion.xml b/docs-xml/smbdotconf/protocol/announceversion.xml
deleted file mode 100644
index ecdcd4c..0000000
--- a/docs-xml/smbdotconf/protocol/announceversion.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<samba:parameter name="announce version"
-                 context="G"
-                 developer="1"
-				 type="string"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
-<description>
-    <para>This specifies the major and minor version numbers 
-    that nmbd will use when announcing itself as a server. The default 
-    is 4.9.  Do not change this parameter unless you have a specific 
-	need to set a Samba server to be a downlevel server.</para>
-</description>
-<value type="default">4.9</value>
-<value type="example">2.0</value>
-</samba:parameter>
diff --git a/install_with_python.sh b/install_with_python.sh
new file mode 100644
index 0000000..d7ae55d
--- /dev/null
+++ b/install_with_python.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# this script installs a private copy of python in the same prefix as Samba
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: install_with_python.sh PREFIX [CONFIGURE OPTIONS]
+EOF
+exit 1;
+fi
+
+PREFIX="$1"
+shift
+
+PATH=$PREFIX/python/bin:$PATH
+export PATH
+
+VERSION="Python-2.6.5"
+
+do_install_python() {
+       mkdir -p python_install || exit 1
+       rsync -avz samba.org::ftp/tridge/python/$VERSION.tar python_install || exit 1
+       cd python_install || exit 1;
+       rm -rf $VERSION || exit 1
+       tar -xf $VERSION.tar || exit 1
+       cd $VERSION || exit 1
+       ./configure --prefix=$PREFIX/python --enable-shared --disable-ipv6 || exit 1
+       make || exit 1
+       make install || exit 1
+       cd ../.. || exit 1
+       rm -rf python_install || exit 1
+}
+
+if ! test -d $PREFIX/python; then
+   # needs to be installed
+   do_install_python
+fi
+
+`dirname $0`/configure --prefix=$PREFIX $@ || exit 1
+make -j || exit 1
+make install || exit 1
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h
index a7e5542..b36c461 100644
--- a/lib/util/charset/charset.h
+++ b/lib/util/charset/charset.h
@@ -28,7 +28,7 @@
 #include <talloc.h>
 
 /* this defines the charset types used in samba */
-typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX, CH_DISPLAY, CH_DOS, CH_UTF8, CH_UTF16BE, CH_UTF16MUNGED} charset_t;
+typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX, CH_DOS, CH_UTF8, CH_UTF16BE, CH_UTF16MUNGED} charset_t;
 
 #define NUM_CHARSETS 7
 
@@ -182,8 +182,7 @@ extern struct smb_iconv_handle *global_iconv_handle;
 struct smb_iconv_handle *get_iconv_handle(void);
 struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx, 
 						  const char *dos_charset, 
-						  const char *unix_charset, 
-						  const char *display_charset);
+						  const char *unix_charset);
 smb_iconv_t get_conv_handle(struct smb_iconv_handle *ic,
 			    charset_t from, charset_t to);
 const char *charset_name(struct smb_iconv_handle *ic, charset_t ch);
@@ -212,7 +211,6 @@ int codepoint_cmpi(codepoint_t c1, codepoint_t c2);
 struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx,
 							   const char *dos_charset,
 							   const char *unix_charset,
-							   const char *display_charset,
 							   bool native_iconv,
 							   struct smb_iconv_handle *old_ic);
 
diff --git a/lib/util/charset/codepoints.c b/lib/util/charset/codepoints.c
index 71611bf..8cc33a9 100644
--- a/lib/util/charset/codepoints.c
+++ b/lib/util/charset/codepoints.c
@@ -168,17 +168,16 @@ struct smb_iconv_handle *get_iconv_handle(void)
 {
 	if (global_iconv_handle == NULL)
 		global_iconv_handle = smb_iconv_handle_reinit(talloc_autofree_context(),
-									"ASCII", "UTF-8", "ASCII", true, NULL);
+							      "ASCII", "UTF-8", true, NULL);
 	return global_iconv_handle;
 }
 
 struct smb_iconv_handle *get_iconv_testing_handle(TALLOC_CTX *mem_ctx, 
 						  const char *dos_charset, 
-						  const char *unix_charset, 
-						  const char *display_charset)
+						  const char *unix_charset)
 {
 	return smb_iconv_handle_reinit(mem_ctx,
-				       dos_charset, unix_charset, display_charset, true, NULL);
+				       dos_charset, unix_charset, true, NULL);
 }
 
 /**
@@ -190,7 +189,6 @@ const char *charset_name(struct smb_iconv_handle *ic, charset_t ch)
 	case CH_UTF16: return "UTF-16LE";
 	case CH_UNIX: return ic->unix_charset;
 	case CH_DOS: return ic->dos_charset;
-	case CH_DISPLAY: return ic->display_charset;
 	case CH_UTF8: return "UTF8";
 	case CH_UTF16BE: return "UTF-16BE";
 	case CH_UTF16MUNGED: return "UTF16_MUNGED";
@@ -219,37 +217,6 @@ static int close_iconv_handle(struct smb_iconv_handle *data)
 	return 0;
 }
 
-static const char *map_locale(const char *charset)
-{
-	if (strcmp(charset, "LOCALE") != 0) {
-		return charset;
-	}
-#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
-	{
-		const char *ln;
-		smb_iconv_t handle;
-
-		ln = nl_langinfo(CODESET);
-		if (ln == NULL) {
-			DEBUG(1,("Unable to determine charset for LOCALE - using ASCII\n"));
-			return "ASCII";
-		}
-		/* Check whether the charset name is supported
-		   by iconv */
-		handle = smb_iconv_open(ln, "UCS-2LE");
-		if (handle == (smb_iconv_t) -1) {
-			DEBUG(5,("Locale charset '%s' unsupported, using ASCII instead\n", ln));
-			return "ASCII";
-		} else {
-			DEBUG(5,("Substituting charset '%s' for LOCALE\n", ln));
-			smb_iconv_close(handle);
-		}
-		return ln;
-	}
-#endif
-	return "ASCII";
-}
-
 /*
   the old_ic is passed in here as the smb_iconv_handle structure
   is used as a global pointer in some places (eg. python modules). We
@@ -261,14 +228,11 @@ static const char *map_locale(const char *charset)
 _PUBLIC_ struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx,
 								    const char *dos_charset,
 								    const char *unix_charset,
-								    const char *display_charset,
 								    bool native_iconv,
 								    struct smb_iconv_handle *old_ic)
 {
 	struct smb_iconv_handle *ret;
 
-	display_charset = map_locale(display_charset);
-
 	if (old_ic != NULL) {
 		ret = old_ic;
 		close_iconv_handle(ret);
@@ -297,7 +261,6 @@ _PUBLIC_ struct smb_iconv_handle *smb_iconv_handle_reinit(TALLOC_CTX *mem_ctx,
 
 	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);
 	ret->native_iconv = native_iconv;
 
 	return ret;
diff --git a/lib/util/charset/tests/convert_string.c b/lib/util/charset/tests/convert_string.c
index bd140d5..9a5d974 100644
--- a/lib/util/charset/tests/convert_string.c
+++ b/lib/util/charset/tests/convert_string.c
@@ -105,7 +105,7 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
 	talloc_steal(tctx, gd_iso8859_1.data);
 	talloc_steal(tctx, gd_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850");
 	torture_assert(tctx, iconv_handle, "getting iconv handle");
 		
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
@@ -199,11 +199,11 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
 	torture_assert_data_blob_equal(tctx, gd_output, gd_cp850, "conversion from UTF8 to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_UTF8, CH_DISPLAY, 
+						    CH_UTF8, CH_UTF8, 
 						    gd_utf8.data, gd_utf8.length, 
 						    (void *)&gd_output.data, &gd_output.length), 
-		       "conversion from UTF8 to (display charset) UTF8");
-	torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF8 to (display charset) UTF8 incorrect");
+		       "conversion from UTF8 to UTF8");
+	torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF8 to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_UTF16LE, CH_DOS, 
@@ -227,11 +227,11 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
 	torture_assert_data_blob_equal(tctx, gd_output, gd_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_UTF16LE, CH_DISPLAY, 
+						    CH_UTF16LE, CH_UTF8, 
 						    gd_utf16le.data, gd_utf16le.length, 
 						    (void *)&gd_output.data, &gd_output.length), 
-		       "conversion from UTF16LE to (display charset) UTF8");
-	torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF16LE to (display charset) UTF8 incorrect");
+		       "conversion from UTF16LE to UTF8");
+	torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF16LE to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_DOS, CH_DOS, 
@@ -248,11 +248,11 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
 	torture_assert_data_blob_equal(tctx, gd_output, gd_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_DOS, CH_DISPLAY, 
+						    CH_DOS, CH_UTF8, 
 						    gd_iso8859_1.data, gd_iso8859_1.length, 
 						    (void *)&gd_output.data, &gd_output.length), 
-		       "conversion from (dos charset) ISO8859-1 to (display charset) UTF8");
-	torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF16LE to (display charset) UTF8 incorrect");
+		       "conversion from (dos charset) ISO8859-1 to UTF8");
+	torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF16LE to UTF8 incorrect");
 
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_DOS, CH_UTF16LE, 
@@ -265,7 +265,7 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
 						     (const char *)gd_iso8859_1.data,
 						     CH_DOS, CH_UTF16LE),
 				 gd_output.length / 2,
-				 "checking strlen_m_ext of round trip conversion of UTF16 latin charset greek to display charset UTF8 and back again");
+				 "checking strlen_m_ext of round trip conversion of UTF16 latin charset greek to UTF8 and back again");
 
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
 						    CH_DOS, CH_UTF8,
@@ -297,7 +297,7 @@ static bool test_gd_minus_1_handle(struct torture_context *tctx)
 	talloc_steal(tctx, gd_cp850.data);
 	talloc_steal(tctx, gd_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "CP850", "CP850", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "CP850", "CP850");
 	torture_assert(tctx, iconv_handle, "getting iconv handle");
 
 	gd_utf8_terminated = data_blob_talloc(tctx, NULL, gd_utf8.length + 1);
@@ -481,7 +481,7 @@ static bool test_gd_ascii_handle(struct torture_context *tctx)
 	talloc_steal(tctx, gd_iso8859_1.data);
 	talloc_steal(tctx, gd_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "ASCII", "UTF8", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "ASCII", "UTF8");
 	torture_assert(tctx, iconv_handle, "getting iconv handle");
 
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
@@ -550,7 +550,7 @@ static bool test_plato_english_iso8859_cp850_handle(struct torture_context *tctx
 	
 	talloc_steal(tctx, plato_english_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850");
 	torture_assert(tctx, iconv_handle, "getting iconv handle");
 		
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
@@ -568,11 +568,11 @@ static bool test_plato_english_iso8859_cp850_handle(struct torture_context *tctx
 	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_cp850, "conversion from UTF8 to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_UTF8, CH_DISPLAY, 
+						    CH_UTF8, CH_UTF8, 
 						    plato_english_utf8.data, plato_english_utf8.length, 
 						    (void *)&plato_english_output.data, &plato_english_output.length), 
-		       "conversion from UTF8 to (display charset) UTF8");
-	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF8 to (display charset) UTF8 incorrect");
+		       "conversion from UTF8 to UTF8");
+	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF8 to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_UTF16LE, CH_DOS, 
@@ -621,11 +621,11 @@ static bool test_plato_english_iso8859_cp850_handle(struct torture_context *tctx
 	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_UTF16LE, CH_DISPLAY, 
+						    CH_UTF16LE, CH_UTF8, 
 						    plato_english_utf16le.data, plato_english_utf16le.length, 
 						    (void *)&plato_english_output.data, &plato_english_output.length), 
-		       "conversion from UTF16LE to (display charset) UTF8");
-	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF16LE to (display charset) UTF8 incorrect");
+		       "conversion from UTF16LE to UTF8");
+	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF16LE to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_DOS, CH_DOS, 
@@ -642,11 +642,11 @@ static bool test_plato_english_iso8859_cp850_handle(struct torture_context *tctx
 	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_DOS, CH_DISPLAY, 
+						    CH_DOS, CH_UTF8, 
 						    plato_english_iso8859_1.data, plato_english_iso8859_1.length, 
 						    (void *)&plato_english_output.data, &plato_english_output.length), 
-		       "conversion from (dos charset) ISO8859-1 to (display charset) UTF8");
-	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF16LE to (display charset) UTF8 incorrect");
+		       "conversion from (dos charset) ISO8859-1 to UTF8");
+	torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF16LE to UTF8 incorrect");
 
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_DOS, CH_UTF16LE, 
@@ -668,7 +668,7 @@ static bool test_plato_english_minus_1_handle(struct torture_context *tctx)
 	
 	talloc_steal(tctx, plato_english_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850");
 	torture_assert(tctx, iconv_handle, "getting iconv handle");
 
 	plato_english_utf8_terminated = data_blob_talloc(tctx, NULL, plato_english_utf8.length + 1);
@@ -809,7 +809,7 @@ static bool test_plato_minus_1_handle(struct torture_context *tctx)
 	talloc_steal(tctx, plato_utf8.data);
 	talloc_steal(tctx, plato_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "ISO8859-1", "CP850");
 	torture_assert(tctx, iconv_handle, "getting iconv handle");
 
 	plato_utf8_terminated = data_blob_talloc(tctx, NULL, plato_utf8.length + 1);
@@ -923,7 +923,7 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
 	talloc_steal(tctx, plato_utf8.data);
 	talloc_steal(tctx, plato_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8");
 	torture_assert(tctx, iconv_handle, "creating iconv handle");
 		
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
@@ -1008,11 +1008,11 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
 	torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF8 to (unix charset) UTF8 incorrect");
 
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_UTF8, CH_DISPLAY, 
+						    CH_UTF8, CH_UTF8, 
 						    plato_utf8.data, plato_utf8.length, 
 						    (void *)&plato_output.data, &plato_output.length),
 		       "conversion of UTF16 ancient greek to unix charset UTF8 failed");
-	torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF8 to (display charset) UTF8 incorrect");
+	torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF8 to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_UTF16LE, CH_DOS, 
@@ -1067,39 +1067,39 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
 		       "conversion of UTF16 ancient greek to UTF8 failed");
 	torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF16LE to UTF8 incorrect");
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-							  CH_UTF16LE, CH_DISPLAY, 
+							  CH_UTF16LE, CH_UTF8, 
 							  plato_utf16le.data, plato_utf16le.length, 
 							  (void *)&plato_output.data, &plato_output.length),
-		       "conversion of UTF16 ancient greek to display charset UTF8 failed");
-	torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF16LE to (display charset) UTF8 incorrect");
+		       "conversion of UTF16 ancient greek to UTF8 failed");
+	torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF16LE to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-							  CH_DISPLAY, CH_UTF16LE, 
+							  CH_UTF8, CH_UTF16LE, 
 							  plato_output.data, plato_output.length, 
 							  (void *)&plato_output2.data, &plato_output2.length),
-		       "round trip conversion of UTF16 ancient greek to display charset UTF8 and back again failed");
+		       "round trip conversion of UTF16 ancient greek to UTF8 and back again failed");
 	torture_assert_data_blob_equal(tctx, plato_output2, plato_utf16le,
-				       "round trip conversion of UTF16 ancient greek to display charset UTF8 and back again failed");
+				       "round trip conversion of UTF16 ancient greek to UTF8 and back again failed");
 	torture_assert_int_equal(tctx,
 				 strlen_m_ext_handle(iconv_handle,
 						     (const char *)plato_output.data,
-						     CH_DISPLAY, CH_UTF16LE),
+						     CH_UTF8, CH_UTF16LE),
 				 plato_output2.length / 2,
-				 "checking strlen_m_ext of round trip conversion of UTF16 latin charset greek to display charset UTF8 and back again");
+				 "checking strlen_m_ext of round trip conversion of UTF16 latin charset greek to UTF8 and back again");
 
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
-							  CH_DISPLAY, CH_UTF8,
+							  CH_UTF8, CH_UTF8,
 							  plato_output.data, plato_output.length,
 							  (void *)&plato_output2.data, &plato_output2.length),
-		       "conversion of display charset UTF8 to UTF8");
+		       "conversion of UTF8 to UTF8");
 	torture_assert_data_blob_equal(tctx, plato_output2, plato_utf8,
-				       "conversion of display charset UTF8 to UTF8");
+				       "conversion of UTF8 to UTF8");
 	torture_assert_int_equal(tctx,
 				 strlen_m_ext_handle(iconv_handle,
 						     (const char *)plato_output.data,
-						     CH_DISPLAY, CH_UTF8),
+						     CH_UTF8, CH_UTF8),
 				 plato_output2.length,
-				 "checking strlen_m_ext of conversion of display charset UTF8 to UTF8");
+				 "checking strlen_m_ext of conversion of UTF8 to UTF8");
 	return true;
 }
 
@@ -1114,7 +1114,7 @@ static bool test_plato_latin_cp850_utf8_handle(struct torture_context *tctx)
 	talloc_steal(tctx, plato_latin_utf8.data);
 	talloc_steal(tctx, plato_latin_utf16le.data);
 
-	iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8", "UTF8");
+	iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8");
 	torture_assert(tctx, iconv_handle, "creating iconv handle");
 		
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
@@ -1131,11 +1131,11 @@ static bool test_plato_latin_cp850_utf8_handle(struct torture_context *tctx)
 	torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF8 to (unix charset) UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-						    CH_UTF8, CH_DISPLAY, 
+						    CH_UTF8, CH_UTF8, 
 						    plato_latin_utf8.data, plato_latin_utf8.length, 
 						    (void *)&plato_latin_output.data, &plato_latin_output.length),
 		       "conversion of UTF16 latin charset greek to unix charset UTF8 failed");
-	torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF8 to (display charset) UTF8 incorrect");
+	torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF8 to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
 						    CH_UTF16LE, CH_DOS, 
@@ -1151,25 +1151,25 @@ static bool test_plato_latin_cp850_utf8_handle(struct torture_context *tctx)
 	torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF16LE to (unix charset) CP850 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-							  CH_UTF16LE, CH_DISPLAY, 
+							  CH_UTF16LE, CH_UTF8, 
 							  plato_latin_utf16le.data, plato_latin_utf16le.length, 
 							  (void *)&plato_latin_output.data, &plato_latin_output.length),
-		       "conversion of UTF16 latin charset greek to display charset UTF8 failed");
-	torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF16LE to (display charset) UTF8 incorrect");
+		       "conversion of UTF16 latin charset greek to UTF8 failed");
+	torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF16LE to UTF8 incorrect");
 	
 	torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-							  CH_DISPLAY, CH_UTF16LE, 
+							  CH_UTF8, CH_UTF16LE, 
 							  plato_latin_output.data, plato_latin_output.length, 
 							  (void *)&plato_latin_output2.data, &plato_latin_output2.length),
-		       "round trip conversion of UTF16 latin charset greek to display charset UTF8 and back again failed");
+		       "round trip conversion of UTF16 latin charset greek to UTF8 and back again failed");
 	torture_assert_data_blob_equal(tctx, plato_latin_output2, plato_latin_utf16le,
-				       "round trip conversion of UTF16 latin charset greek to display charset UTF8 and back again failed");
+				       "round trip conversion of UTF16 latin charset greek to UTF8 and back again failed");
 	torture_assert_int_equal(tctx,
 				 strlen_m_ext_handle(iconv_handle,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list