From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57057 invoked by alias); 19 Jan 2017 20:17:35 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 57043 invoked by uid 89); 19 Jan 2017 20:17:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 20:17:24 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A0BE6A6D6 for ; Thu, 19 Jan 2017 20:17:24 +0000 (UTC) Received: from [10.10.117.52] (ovpn-117-52.rdu2.redhat.com [10.10.117.52]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0JKHNqF005937 for ; Thu, 19 Jan 2017 15:17:24 -0500 Subject: Re: [SECURITY] libidn - locale specific error in test suite To: cygwin-apps@cygwin.com References: <90dee62a-dc34-f83a-7094-8e0df688d801@cygwin.com> <20381568-c93e-1517-0f3d-579a5e6ac3fa@volkerzell.de> <20170109142640.GC843@calimero.vinschen.de> <86acc3c1-23ff-d76c-f7c8-c3cefcd567fa@volkerzell.de> <39d8753c-c875-0910-8ce8-5464d09b8235@redhat.com> <20170119181930.GC25162@calimero.vinschen.de> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Message-ID: Date: Thu, 19 Jan 2017 20:17:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170119181930.GC25162@calimero.vinschen.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i1tiRo9F53r69BsLf7VXBmK81NcbvAE5k" X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00027.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i1tiRo9F53r69BsLf7VXBmK81NcbvAE5k Content-Type: multipart/mixed; boundary="kvb8jBav1wp1b2ChIbeGqRimMlaSW50lf"; protected-headers="v1" From: Eric Blake To: cygwin-apps@cygwin.com Message-ID: Subject: Re: [SECURITY] libidn - locale specific error in test suite References: <90dee62a-dc34-f83a-7094-8e0df688d801@cygwin.com> <20381568-c93e-1517-0f3d-579a5e6ac3fa@volkerzell.de> <20170109142640.GC843@calimero.vinschen.de> <86acc3c1-23ff-d76c-f7c8-c3cefcd567fa@volkerzell.de> <39d8753c-c875-0910-8ce8-5464d09b8235@redhat.com> <20170119181930.GC25162@calimero.vinschen.de> In-Reply-To: <20170119181930.GC25162@calimero.vinschen.de> --kvb8jBav1wp1b2ChIbeGqRimMlaSW50lf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1846 On 01/19/2017 12:19 PM, Corinna Vinschen wrote: >>> The test comes from gnulib, so I'm familiar with ideas on how to try and >>> whittle it down to a smaller self-contained test. I'll see if I can >>> spend a moment on it today. >>> >> >> After stepping through a debugger, it looks like this is a bug in gnulib >> and not cygwin. Gnulib is trying to test that its own function >> gl_locale_name() can track the use of uselocale() to set a thread-local >> locale that overrides the global locale. It has platform specific code >> for various platforms (glibc uses nl_langinfo(), BSD uses querylocale(), >> Sun uses getlocalename_l() - surprisingly none of the platforms use >> nl_langinfo_l()!), then falls back to probing the environment. As long >> as cygwin lacked uselocale(), then probing the environment was correct. >> But now that cygwin supports uselocale(), the gnulib code needs to add a >> cygwin-specific clause to its list of various platform methods. >> >> I'll propose a patch to upstream gnulib, and cc this list - any project >> using gnulib will have to backport that patch or wait for a new upstream >> release of that project that uses newer gnulib if it wants to work >> around the bug. >=20 > Thanks for letting us know! Actually, Cygwin (or newlib) will need a patch, too. glibc provides the macro NL_LOCALE_NAME, which can be used as follows: locale =3D newlocale(...); uselocale(locale); nl_langinfo_l(NL_LOCALE_NAME(LC_MESSAGES), locale); to recover the name of the LC_MESSAGES portion of the locale object. As Cygwin lacks that macro, there is NO way to access the locale name of what went into constructing a thread-local locale without peeking into the internal guts of the opaque locale_t object. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --kvb8jBav1wp1b2ChIbeGqRimMlaSW50lf-- --i1tiRo9F53r69BsLf7VXBmK81NcbvAE5k Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 604 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYgR7SAAoJEKeha0olJ0NqK4gH/RXRdAUo4h7XrfqZx2+/Uum+ TUZNWMwRIr9Ak6CjwxJ0l+30bRL1waeeQ7vf6xsvyAukjVGVInVsyBUeZR5b64hz gtaANtX1OBs0+mi83LE55R/89aw0rq0NMdhTQpif/S2oVZsPciKbq654PybcsUXH dcnSHYqs0HimAb6B/P7M7KhoCZSqEXmSFUjlH84ZZFKrzDlSe8u6rdTxY/tZj/Mr Tl29xfuJ9kNta6R9QX1iqy3XQixz84ikvUlI5Tg9vRyl/AapDft/uUhgT+eOg4yG WiUovcwXnVwueyAVikjnJyyrD+BxfLgG6bioQnnfTsqiGUZb65Zh0IJ1F0Qgtuw= =WGRc -----END PGP SIGNATURE----- --i1tiRo9F53r69BsLf7VXBmK81NcbvAE5k--