public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: [SECURITY] libidn - locale specific error in test suite
Date: Fri, 20 Jan 2017 08:36:00 -0000	[thread overview]
Message-ID: <20170120083605.GD25162@calimero.vinschen.de> (raw)
In-Reply-To: <e2fee223-467d-c9dd-0eee-eb178bc62b16@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]

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 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.
> 
> >> 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.
> > 
> > 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?
> 
> 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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-01-20  8:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26 15:18 [SECURITY] libidn Yaakov Selkowitz
2016-09-30  6:44 ` Dr. Volker Zell
2016-12-29 20:49   ` Yaakov Selkowitz
2017-01-03 10:54     ` [SECURITY] libidn - locale specific error in test suite Dr. Volker Zell
2017-01-09 14:26       ` Corinna Vinschen
2017-01-18 12:13         ` Dr. Volker Zell
2017-01-18 15:24           ` Eric Blake
2017-01-19 10:39             ` Corinna Vinschen
2017-01-19 17:40             ` Eric Blake
2017-01-19 18:19               ` Corinna Vinschen
2017-01-19 20:17                 ` Eric Blake
2017-01-19 21:02                   ` Corinna Vinschen
2017-01-19 21:17                     ` Eric Blake
2017-01-20  8:36                       ` Corinna Vinschen [this message]
2017-01-19 20:34                 ` Eric Blake
2017-01-19 20:43       ` Yaakov Selkowitz
2017-02-22 18:58         ` Yaakov Selkowitz
2017-03-10 22:01           ` Yaakov Selkowitz
2017-03-24 19:00             ` Yaakov Selkowitz
2017-05-03 21:38               ` Yaakov Selkowitz
2017-03-10 22:02           ` Yaakov Selkowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170120083605.GD25162@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).