Andreas Schwab
746e16d2b9
- Update to glibc 2.17.90 85891acadf1b: * CVE-2013-2207 Incorrectly granting access to another user's pseudo-terminal has been fixed by disabling the use of pt_chown (Bugzilla #15755). Distributions can re-enable building and using pt_chown via the new configure option `--enable-pt_chown'. Enabling the use of pt_chown carries with it considerable security risks and should only be used if the distribution understands and accepts the risks. * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla #15078). * CVE-2013-1914 Stack overflow in getaddrinfo with many results has been fixed (Bugzilla #15330). * Add support for calling C++11 thread_local object destructors on thread and program exit. This needs compiler support for offloading C++11 destructor calls to glibc. * Improved worst case performance of libm functions with double inputs and output. * Support for priority inherited mutexes in pthread condition variables on non-x86 architectures. * Optimized string functions for AArch64. Implemented by Marcus Shawcroft. * Optimized string functions for ARM. Implemented by Will Newton and Richard Henderson. * Added a benchmark framework to track performance of functions in glibc. * New <math.h> macro named issignaling to check for a signaling NaN (sNaN). It is based on draft TS 18661 and currently enabled as a GNU extension. * On Linux, the clock function now uses the clock_gettime system call for improved precision, rather than old times system call. * Added new API functions pthread_getattr_default_np and pthread_setattr_default_np to get and set the default pthread attributes of a process. * Added support for TSX lock elision for pthread mutexes on i386 and x86-64. OBS-URL: https://build.opensuse.org/request/show/186119 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=304
60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
Index: glibc-2.17.90/intl/loadmsgcat.c
|
|
===================================================================
|
|
--- glibc-2.17.90.orig/intl/loadmsgcat.c
|
|
+++ glibc-2.17.90/intl/loadmsgcat.c
|
|
@@ -806,8 +806,52 @@ _nl_load_domain (domain_file, domainbind
|
|
if (domain_file->filename == NULL)
|
|
goto out;
|
|
|
|
- /* Try to open the addressed file. */
|
|
- fd = open (domain_file->filename, O_RDONLY);
|
|
+ /* Replace /locale/ with /usr/share/locale-langpack/ */
|
|
+ const char *langpackdir = "/usr/share/locale-langpack/";
|
|
+ char *filename_langpack = malloc (strlen (domain_file->filename) +
|
|
+ strlen (langpackdir));
|
|
+ if (filename_langpack != NULL)
|
|
+ {
|
|
+ char *p = strstr (domain_file->filename, "/locale/");
|
|
+ if (p != NULL)
|
|
+ {
|
|
+ strcpy (filename_langpack, langpackdir);
|
|
+ strcpy (&filename_langpack[strlen (langpackdir)],
|
|
+ (p+8));
|
|
+ if ((fd = open (filename_langpack, O_RDONLY)) == -1)
|
|
+ fd = open (domain_file->filename, O_RDONLY);
|
|
+ }
|
|
+ else
|
|
+ /* Try to open the addressed file. */
|
|
+ fd = open (domain_file->filename, O_RDONLY);
|
|
+
|
|
+ free (filename_langpack);
|
|
+ }
|
|
+ else
|
|
+ /* Try to open the addressed file. */
|
|
+ fd = open (domain_file->filename, O_RDONLY);
|
|
+
|
|
+ if (fd == -1)
|
|
+ {
|
|
+ /* Use the fallback directory. */
|
|
+ const char *bundle_dir = "/usr/share/locale-bundle/";
|
|
+ char *filename_bundle = malloc (strlen (domain_file->filename) +
|
|
+ strlen (bundle_dir));
|
|
+ if (filename_bundle != NULL)
|
|
+ {
|
|
+ char *p = strstr (domain_file->filename, "/locale/");
|
|
+ if (p != NULL)
|
|
+ {
|
|
+ strcpy (filename_bundle, bundle_dir);
|
|
+ strcpy (&filename_bundle[strlen (bundle_dir)],
|
|
+ (p+8));
|
|
+ fd = open (filename_bundle, O_RDONLY);
|
|
+ }
|
|
+
|
|
+ free (filename_bundle);
|
|
+ }
|
|
+ }
|
|
+
|
|
if (fd == -1)
|
|
goto out;
|
|
|