glibc/glibc-2.3.90-langpackdir.diff
Andreas Schwab a39c2d7af8 Accepting request 1143408 from home:Andreas_Schwab:Factory
- Update to glibc 2.39
  * A new tunable, glibc.cpu.plt_rewrite, can be used to enable PLT
    rewrite on x86-64
  * Sync with Linux kernel 6.6 shadow stack interface
  * struct statvfs now has an f_type member, equal to the f_type statfs
    member
  * On Linux, the functions posix_spawnattr_getcgroup_np and
    posix_spawnattr_setcgroup_np have been added, along with the
    POSIX_SPAWN_SETCGROUP flag
  * On Linux, the pidfd_spawn and pidfd_spawp functions have been added
  * On Linux, the pidfd_getpid function has been added
  * scanf-family functions now support the wN format length modifiers for
    arguments pointing to types intN_t, int_leastN_t, uintN_t or
    uint_leastN_t
  * A new tunable, glibc.mem.decorate_maps, can be used to add additional
    information on underlying memory allocated by the glibc
  * The <stdbit.h> header has been added from ISO C2X
  * On AArch64 new symbols were added to libmvec
  * The ldconfig program now skips file names containing ';' or ending in
    ".dpkg.tmp" or ".dpkg.new"
  * The dynamic linker calls the malloc and free functions in more cases
    during TLS access if a shared object with dynamic TLS is loaded and
    unloaded
- aarch64-rawmemchr-unwind.patch, cache-amd-legacy.patch,
  cache-intel-shared.patch, call-init-proxy-objects.patch,
  fstat-implementation.patch, gb18030-2022.patch,
  getaddrinfo-eai-memory.patch, getaddrinfo-memory-leak.patch,
  getcanonname-use-after-free.patch, iconv-error-verbosity.patch,
  intl-c-utf-8-like-c-locale.patch, ldconfig-process-elf-file.patch,
  libio-io-vtables.patch, libio-wdo-write.patch,

OBS-URL: https://build.opensuse.org/request/show/1143408
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=692
2024-02-01 14:30:28 +00:00

55 lines
1.8 KiB
Diff

Index: glibc-2.38/debug/strcpy_chk.c
===================================================================
--- glibc-2.38.orig/debug/strcpy_chk.c
+++ glibc-2.38/debug/strcpy_chk.c
@@ -31,3 +31,4 @@ __strcpy_chk (char *dest, const char *sr
return memcpy (dest, src, len + 1);
}
+libc_hidden_builtin_def (__strcpy_chk)
Index: glibc-2.38/include/string.h
===================================================================
--- glibc-2.38.orig/include/string.h
+++ glibc-2.38/include/string.h
@@ -213,6 +213,7 @@ libc_hidden_builtin_proto (__memcpy_chk)
libc_hidden_builtin_proto (__memmove_chk)
libc_hidden_builtin_proto (__mempcpy_chk)
libc_hidden_builtin_proto (__memset_chk)
+libc_hidden_builtin_proto (__strcpy_chk)
libc_hidden_builtin_proto (__stpcpy_chk)
libc_hidden_builtin_proto (__strncpy_chk)
Index: glibc-2.38/intl/loadmsgcat.c
===================================================================
--- glibc-2.38.orig/intl/loadmsgcat.c
+++ glibc-2.38/intl/loadmsgcat.c
@@ -796,8 +796,26 @@ _nl_load_domain (struct loaded_l10nfile
if (domain_file->filename == NULL)
goto out;
- /* Try to open the addressed file. */
- fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+ /* 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 (__stpcpy (filename_langpack, langpackdir), p + 8);
+ fd = open (filename_langpack, O_RDONLY | O_BINARY);
+ }
+
+ free (filename_langpack);
+ }
+
+ if (fd == -1)
+ /* Try to open the addressed file. */
+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+
if (fd == -1)
goto out;