From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89698 invoked by alias); 20 Jan 2017 08:36:16 -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 74641 invoked by uid 89); 20 Jan 2017 08:36:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jan 2017 08:36:10 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id 55F04721E2822 for ; Fri, 20 Jan 2017 09:36:06 +0100 (CET) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id 8D05E5E0212 for ; Fri, 20 Jan 2017 09:36:05 +0100 (CET) Received: by calimero.vinschen.de (Postfix, from userid 500) id 6F439A8063F; Fri, 20 Jan 2017 09:36:05 +0100 (CET) Date: Fri, 20 Jan 2017 08:36:00 -0000 From: Corinna Vinschen To: cygwin-apps@cygwin.com Subject: Re: [SECURITY] libidn - locale specific error in test suite Message-ID: <20170120083605.GD25162@calimero.vinschen.de> Reply-To: cygwin-apps@cygwin.com Mail-Followup-To: cygwin-apps@cygwin.com References: <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> <20170119210219.GA3775@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SFyWQ0h3ruR435lw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-SW-Source: 2017-01/txt/msg00032.txt.bz2 --SFyWQ0h3ruR435lw Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1623 On Jan 19 15:17, Eric Blake wrote: > On 01/19/2017 03:02 PM, Corinna Vinschen wrote: > >>>> After stepping through a debugger, it looks like this is a bug in gn= ulib > >>>> 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-lo= cal > >>>> locale that overrides the global locale. >=20 > >> 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 > > Question: Why is that needed outside of testcases? If you called > > newlocale you know how it has been constructed. The info should be > > available. I have no problems to take glibc emulating stuff, but is > > there a real-world example? >=20 > Yes. Consider a library-writer that wants to do something in the correct > locale. Here, you have a logical separation from the main app that > calls newlocale()/uselocale() and the library code that now wants to > reconstruct what the current locale is. So being able to reconstruct > the names of the thread-local locale via gl_locale_name() makes the > library less coupled to the main app's setup. In particular, at least > gettext wants to use it. Ok, makes sense. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --SFyWQ0h3ruR435lw Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYgcv1AAoJEPU2Bp2uRE+gC1sP/0FN0t2CF92ZQxfKH89TSJ8u HLnsUBVYkgN4KsYnn0QZQKz3zxgHvG06wR2iI/nnOtMw/AyvUKip1HVFtZ5lfVhS kky2z9h9MmmOYzBK+UG1FoO86PBel9s/RHuI4/WZf0VmAL1yxQFcG/0AYCAL+zMd uyB300iIxPUGSesVqsxdpS+SS5TXFG3bLdX/rKequvcISlVCQKa5Nv5Vx+++ATgb p/HFQ8/7EV9lx2zohNvWNzVLQ9xpIn8ECTe8u5/OR/UauMz3CQbQfhbDqQKoqvW8 FaPWlsONMJW6u1AwaM2bO9qE3U+0iX+XmDmafIKQ5qTmwGVpvi+itow5snqlFixx iTiXov+stLkeMzHVScvkNtdZEFGDxP5JRRBIS3yaeyR1RfQoEndlZc1TrICHJnyY knmdVuwIZFpWcDxLRwJ/TaCixYkfSFMtNyKOwKlxqn4mfVDB960+vpHud0WwuNoZ hUfC34FX4lBdwbT4+o9ynjL8rBjAW6IWF24LRy30cRfjAdrrGaPPgnfn+/BBwgg+ 1LPBbK5r/4UPMN5kkW32PKmwTqezHy0VnFGKOgtziVvpflNQyAqM6c+ttqC9JNs8 Hi3dLmjwnSVMdhZuHCtnjTfBtbiG4Q57A6C3jxroGH2fYVvm5RRRLXdAJSbViQrT 3lIyVlwGmBEQxuAPzMeC =ZzZb -----END PGP SIGNATURE----- --SFyWQ0h3ruR435lw--