1.1 --- a/patches/glibc/2.1.3/rh62-02-glibc-2.1.3-locale.patch Tue Aug 14 19:32:22 2007 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,76 +0,0 @@
1.4 -2000-08-27 Ulrich Drepper <drepper@redhat.com>
1.5 -
1.6 - * intl/dcgettext.c (DCGETTEXT): Remove _nl_find_language in code
1.7 - to determine invalid locale name.
1.8 - * locale/findlocale.c (_nl_find_locale): Likewise.
1.9 -
1.10 -2000-08-21 Ulrich Drepper <drepper@redhat.com>
1.11 -
1.12 - * catgets/catgets.c (catopen): Filter out env_var values with / if
1.13 - necessary.
1.14 -
1.15 - * locale/findlocale.c (_nl_find_locale): Move test for unusable
1.16 - locale name after all getenvs.
1.17 -
1.18 ---- glibc-2.1.3/catgets/catgets.c 2000/01/29 11:56:33 1.15
1.19 -+++ glibc-2.1.3/catgets/catgets.c 2000/08/21 20:55:30 1.16
1.20 -@@ -50,7 +50,8 @@
1.21 - /* Use the LANG environment variable. */
1.22 - env_var = getenv ("LANG");
1.23 -
1.24 -- if (env_var == NULL)
1.25 -+ if (env_var == NULL || *env_var == '\0'
1.26 -+ || (__libc_enable_secure && strchr (env_var, '/') != NULL))
1.27 - env_var = "C";
1.28 -
1.29 - env_var_len = strlen (env_var) + 1;
1.30 ---- glibc-2.1.3/locale/findlocale.c 1999/11/08 23:45:13 1.10.2.1
1.31 -+++ glibc-2.1.3/locale/findlocale.c 2000/08/21 21:02:42 1.10.2.2
1.32 -@@ -1,4 +1,4 @@
1.33 --/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
1.34 -+/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
1.35 - This file is part of the GNU C Library.
1.36 - Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
1.37 -
1.38 -@@ -54,11 +54,7 @@
1.39 - const char *revision;
1.40 - struct loaded_l10nfile *locale_file;
1.41 -
1.42 -- if ((*name)[0] == '\0'
1.43 -- /* In SUID binaries we must not allow people to access files
1.44 -- outside the dedicated locale directories. */
1.45 -- || (__libc_enable_secure
1.46 -- && memchr (*name, '/', _nl_find_language (*name) - *name) != NULL))
1.47 -+ if ((*name)[0] == '\0')
1.48 - {
1.49 - /* The user decides which locale to use by setting environment
1.50 - variables. */
1.51 -@@ -67,9 +63,12 @@
1.52 - *name = getenv (_nl_category_names[category]);
1.53 - if (*name == NULL || (*name)[0] == '\0')
1.54 - *name = getenv ("LANG");
1.55 -- if (*name == NULL || (*name)[0] == '\0')
1.56 -- *name = (char *) _nl_C_name;
1.57 - }
1.58 -+
1.59 -+ if (*name == NULL || (*name)[0] == '\0'
1.60 -+ || (__builtin_expect (__libc_enable_secure, 0)
1.61 -+ && strchr (*name, '/') != NULL))
1.62 -+ *name = (char *) _nl_C_name;
1.63 -
1.64 - if (strcmp (*name, _nl_C_name) == 0 || strcmp (*name, _nl_POSIX_name) == 0)
1.65 - {
1.66 ---- glibc-2.1.3/intl/dcgettext.c Sun Aug 27 23:15:33 2000
1.67 -+++ glibc-2.1.3/intl/dcgettext.c Sun Aug 27 23:16:34 2000
1.68 -@@ -371,10 +371,7 @@
1.69 -
1.70 - /* When this is a SUID binary we must not allow accessing files
1.71 - outside the dedicated directories. */
1.72 -- if (ENABLE_SECURE
1.73 -- && (memchr (single_locale, '/',
1.74 -- _nl_find_language (single_locale) - single_locale)
1.75 -- != NULL))
1.76 -+ if (ENABLE_SECURE && strchr (single_locale, '/') != NULL)
1.77 - /* Ingore this entry. */
1.78 - continue;
1.79 - }