Update.
* sysdeps/i370/Implies: Removed. * sysdeps/mvs/Implies: Removed. * catgets/catgets.c (catopen): Filter out env_var values with / if necessary. * locale/findlocale.c (_nl_find_locale): Move test for unusable locale name after all getenvs.
This commit is contained in:
parent
ce19d41746
commit
63336471f0
@ -1,5 +1,14 @@
|
||||
2000-08-21 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/i370/Implies: Removed.
|
||||
* sysdeps/mvs/Implies: Removed.
|
||||
|
||||
* catgets/catgets.c (catopen): Filter out env_var values with / if
|
||||
necessary.
|
||||
|
||||
* locale/findlocale.c (_nl_find_locale): Move test for unusable
|
||||
locale name after all getenvs.
|
||||
|
||||
* configure.in: Allow sed versions like 3.02.8.
|
||||
Patch by Rodrigo Barbosa <rodrigob@conectiva.com.br>.
|
||||
|
||||
|
@ -50,7 +50,8 @@ catopen (const char *cat_name, int flag)
|
||||
/* Use the LANG environment variable. */
|
||||
env_var = getenv ("LANG");
|
||||
|
||||
if (env_var == NULL)
|
||||
if (env_var == NULL || *env_var == '\0'
|
||||
|| (__libc_enable_secure && strchr (env_var, '/') != NULL))
|
||||
env_var = "C";
|
||||
|
||||
env_var_len = strlen (env_var) + 1;
|
||||
|
@ -54,11 +54,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
|
||||
const char *revision;
|
||||
struct loaded_l10nfile *locale_file;
|
||||
|
||||
if ((*name)[0] == '\0'
|
||||
/* In SUID binaries we must not allow people to access files
|
||||
outside the dedicated locale directories. */
|
||||
|| (__builtin_expect (__libc_enable_secure, 0)
|
||||
&& memchr (*name, '/', _nl_find_language (*name) - *name) != NULL))
|
||||
if ((*name)[0] == '\0')
|
||||
{
|
||||
/* The user decides which locale to use by setting environment
|
||||
variables. */
|
||||
@ -67,10 +63,13 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
|
||||
*name = getenv (_nl_category_names[category]);
|
||||
if (*name == NULL || (*name)[0] == '\0')
|
||||
*name = getenv ("LANG");
|
||||
if (*name == NULL || (*name)[0] == '\0')
|
||||
*name = (char *) _nl_C_name;
|
||||
}
|
||||
|
||||
if (*name == NULL || (*name)[0] == '\0'
|
||||
|| (__builtin_expect (__libc_enable_secure, 0)
|
||||
&& memchr (*name, '/', _nl_find_language (*name) - *name) != NULL))
|
||||
*name = (char *) _nl_C_name;
|
||||
|
||||
if (__builtin_expect (strcmp (*name, _nl_C_name), 1) == 0
|
||||
|| __builtin_expect (strcmp (*name, _nl_POSIX_name), 1) == 0)
|
||||
{
|
||||
|
@ -1 +0,0 @@
|
||||
wordsize-32
|
@ -1 +0,0 @@
|
||||
posix
|
Loading…
Reference in New Issue
Block a user