New version 2.24

Re-diff some patches
Drop no longer needed patches
This commit is contained in:
Andrey Bondrov 2016-09-01 14:57:23 +10:00
parent 491d5748bd
commit c532d8d676
38 changed files with 202 additions and 46863 deletions

View file

@ -1,6 +1,6 @@
sources: sources:
crypt_blowfish-1.2.tar.gz: 306ff83af206fac786900ce5e4800516cae909d9 crypt_blowfish-1.3.tar.gz: 461ba876ebacd5f7dc95f1eb3c5286d6e0983ae0
crypt_blowfish-1.2.tar.gz.sign: 982d2d5585d60fc01d18005c2b5e57a1a44b45d7 crypt_blowfish-1.3.tar.gz.sign: 96336a263160d3efdd56d983cd9d5e18145271bf
glibc-2.19.tar.xz: b29e1f94b8a32e283e1cb66c9a913950c496fb51 glibc-2.24.tar.xz: e5d9725d94d59475d9a6869a4447a70c1bf3ef78
glibc-2.19.tar.xz.sig: 68baae89199300ce9b0f51f959a6c4df5bc18685 glibc-2.24.tar.xz.sig: 9903f9767edcd089731299a6f4774a2dafd0846b
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f

View file

@ -1,10 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: http://www.openwall.com/signatures/
iQCVAwUATiLawHK5fbEpUCnxAQIT4wP9GTUroM4r21oggeW0k3j5vICwSVHV5BbJ
MBOfliwa1tW9JNh/dEA9GHiPeVWXr/KNWm9/3bSYGDqfsYMlQ7x8w/CCUrS/gvpv
XtvwxUE5juAH5wy4+6oV1gBWiISWGOUcCqkgxPVZKOjlSV4c7kvr10JwqYdnqjK9
RT/A2FgAxM4=
=K4Xs
-----END PGP SIGNATURE-----

View file

@ -16,10 +16,10 @@ Index: glibc-2.14.1/crypt/x86.S
-.section .note.GNU-stack,"",@progbits -.section .note.GNU-stack,"",@progbits
+.section .note.GNU-stack,"",%progbits +.section .note.GNU-stack,"",%progbits
#endif #endif
Index: glibc-2.14.1/crypt_blowfish-1.2/x86.S Index: glibc-2.14.1/crypt_blowfish-1.3/x86.S
=================================================================== ===================================================================
--- glibc-2.14.1.orig/crypt_blowfish-1.2/x86.S --- glibc-2.14.1.orig/crypt_blowfish-1.3/x86.S
+++ glibc-2.14.1/crypt_blowfish-1.2/x86.S +++ glibc-2.14.1/crypt_blowfish-1.3/x86.S
@@ -199,5 +199,5 @@ BF_die: @@ -199,5 +199,5 @@ BF_die:
#endif #endif

View file

@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.6 2010/02/20 14:45:06 solar Exp $ * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.8 2014/07/07 15:44:50 solar Exp $
* $Id: crypt.c,v 1.15 1994/09/13 04:58:49 davidb Exp $ * $Id: crypt.c,v 1.15 1994/09/13 04:58:49 davidb Exp $
* *
* This is an original implementation of the DES and the crypt(3) interfaces * This is an original implementation of the DES and the crypt(3) interfaces
@ -219,7 +219,6 @@ _crypt_extended_init(void)
u_int32_t *p, *il, *ir, *fl, *fr; u_int32_t *p, *il, *ir, *fl, *fr;
u_int32_t *bits28, *bits24; u_int32_t *bits28, *bits24;
u_char inv_key_perm[64]; u_char inv_key_perm[64];
u_char u_key_perm[56];
u_char inv_comp_perm[56]; u_char inv_comp_perm[56];
u_char init_perm[64], final_perm[64]; u_char init_perm[64], final_perm[64];
u_char u_sbox[8][64]; u_char u_sbox[8][64];
@ -261,7 +260,6 @@ _crypt_extended_init(void)
* compression permutation. * compression permutation.
*/ */
for (i = 0; i < 56; i++) { for (i = 0; i < 56; i++) {
u_key_perm[i] = key_perm[i] - 1;
inv_key_perm[key_perm[i] - 1] = i; inv_key_perm[key_perm[i] - 1] = i;
inv_comp_perm[i] = 255; inv_comp_perm[i] = 255;
} }
@ -630,7 +628,8 @@ _crypt_extended_r(const char *key, const char *setting,
*/ */
q = (u_char *) keybuf; q = (u_char *) keybuf;
while (q - (u_char *) keybuf < sizeof(keybuf)) { while (q - (u_char *) keybuf < sizeof(keybuf)) {
if ((*q++ = *key << 1)) *q++ = *key << 1;
if (*key)
key++; key++;
} }
if (des_setkey((u_char *) keybuf, data)) if (des_setkey((u_char *) keybuf, data))
@ -760,6 +759,8 @@ static struct {
{"_J9..SDizxmRI1GjnQuE", "zxyDPWgydbQjgq"}, {"_J9..SDizxmRI1GjnQuE", "zxyDPWgydbQjgq"},
{"_K9..SaltNrQgIYUAeoY", "726 even"}, {"_K9..SaltNrQgIYUAeoY", "726 even"},
{"_J9..SDSD5YGyRCr4W4c", ""}, {"_J9..SDSD5YGyRCr4W4c", ""},
{"_01234567IBjxKliXXRQ", "\xc3\x80" "1234abcd"},
{"_012345678OSGpGQRVHA", "\xc3\x80" "9234abcd"},
/* "old"-style, valid salts */ /* "old"-style, valid salts */
{"CCNf8Sbh3HDfQ", "U*U*U*U*"}, {"CCNf8Sbh3HDfQ", "U*U*U*U*"},
{"CCX.K.MFy4Ois", "U*U***U"}, {"CCX.K.MFy4Ois", "U*U***U"},
@ -771,6 +772,8 @@ static struct {
{"A9RXdR23Y.cY6", "password"}, {"A9RXdR23Y.cY6", "password"},
{"ZziFATVXHo2.6", "password"}, {"ZziFATVXHo2.6", "password"},
{"zZDDIZ0NOlPzw", "password"}, {"zZDDIZ0NOlPzw", "password"},
{"99PxawtsTfX56", "\xc3\x80" "1234abcd"},
{"99jcVcGxUZOWk", "\xc3\x80" "9234abcd"},
/* "old"-style, "reasonable" invalid salts, UFC-crypt behavior expected */ /* "old"-style, "reasonable" invalid salts, UFC-crypt behavior expected */
{"\001\002wyd0KZo65Jo", "password"}, {"\001\002wyd0KZo65Jo", "password"},
{"a_C10Dk/ExaG.", "password"}, {"a_C10Dk/ExaG.", "password"},

View file

@ -1,23 +0,0 @@
--- libc/localedata/locales/bo_CN.bero 2012-12-27 21:59:42.264405770 +0100
+++ libc/localedata/locales/bo_CN 2012-12-27 21:59:49.516318268 +0100
@@ -144,8 +144,7 @@ END LC_MEASUREMENT
LC_NAME
% FIXME
-
-name_fmt ""
+name_fmt "FIXME"
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"
--- libc/localedata/locales/bo_IN.bero 2012-12-27 21:59:52.912277247 +0100
+++ libc/localedata/locales/bo_IN 2012-12-27 22:00:49.732591846 +0100
@@ -70,7 +70,7 @@ END LC_MEASUREMENT
LC_NAME
% FIXME
-name_fmt ""
+name_fmt "FIXME"
% name_gen "FIXME"
% name_miss "FIXME"
% name_mr "FIXME"

View file

@ -1,57 +0,0 @@
diff -Nrup a/localedata/locales/cy_GB b/localedata/locales/cy_GB
--- a/localedata/locales/cy_GB 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/cy_GB 2012-06-07 12:15:21.805318719 -0600
@@ -248,9 +248,9 @@ mon "<U0049><U006F><U006E><U0061
d_t_fmt "<U0044><U0079><U0064><U0064><U0020><U0025><U0041><U0020><U0025><U0064><U0020><U006d><U0069><U0073><U0020><U0025><U0042><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "<U0061><U006D>";"<U0070><U006D>"
+am_pm "<U0041><U004D>";"<U0050><U004D>"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
-date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
first_workday 2
diff -Nrup a/localedata/locales/en_GB b/localedata/locales/en_GB
--- a/localedata/locales/en_GB 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/en_GB 2012-06-07 12:15:21.806318715 -0600
@@ -116,7 +116,7 @@ mon "<U004A><U0061><U006E><U0075
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
-am_pm "<U0061><U006D>";"<U0070><U006D>"
+am_pm "<U0041><U004D>";"<U0050><U004D>"
t_fmt_ampm "<U0025><U006C><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0050><U0020><U0025><U005A>"
date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
diff -Nrup a/localedata/locales/zh_TW b/localedata/locales/zh_TW
--- a/localedata/locales/zh_TW 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/locales/zh_TW 2012-06-07 12:15:21.807318711 -0600
@@ -1,7 +1,7 @@
comment_char %
escape_char /
%
-% Chinese language locale for Taiwan R.O.C.
+% Chinese language locale for Taiwan
% charmap: BIG5-CP950
%
% Original Author:
@@ -17,7 +17,7 @@ escape_char /
% Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf
LC_IDENTIFICATION
-title "Chinese locale for Taiwan R.O.C."
+title "Chinese locale for Taiwan"
source ""
address ""
contact ""
@@ -25,7 +25,7 @@ email "bug-glibc-locales@gnu.org"
tel ""
fax ""
language "Chinese"
-territory "Taiwan R.O.C."
+territory "Taiwan"
revision "0.2"
date "2000-08-02"
%

View file

@ -1,57 +0,0 @@
From ee3d4021aaaeacff7cf2addcdaa48859fffba2aa Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 3 Feb 2011 15:45:02 +0100
Subject: [PATCH] Replace setuid by file capabilities
* login/programs/pt_chown.c (main): Check for valid file
descriptor instead of privileges. Be careful to drop all
capabilities when not needed.
---
ChangeLog | 6 ++++++
login/programs/pt_chown.c | 14 +++++++++-----
3 files changed, 16 insertions(+), 6 deletions(-)
--- a/login/programs/pt_chown.c
+++ b/login/programs/pt_chown.c
@@ -28,6 +28,7 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <fcntl.h>
#ifdef HAVE_LIBCAP
# include <sys/capability.h>
# include <sys/prctl.h>
@@ -142,7 +143,7 @@ main (int argc, char *argv[])
uid_t uid = getuid ();
int remaining;
- if (argc == 1 && euid == 0)
+ if (argc == 1 && fcntl (PTY_FILENO, F_GETFD) == 0)
{
#ifdef HAVE_LIBCAP
/* Drop privileges. */
@@ -175,6 +176,13 @@ main (int argc, char *argv[])
/* We aren't going to be using privileges, so drop them right now. */
setuid (uid);
+#ifdef HAVE_LIBCAP
+ cap_t caps = cap_init ();
+ if (caps == NULL)
+ error (1, errno, "cap_init");
+ cap_set_proc (caps);
+ cap_free (caps);
+#endif
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
@@ -194,9 +202,5 @@ main (int argc, char *argv[])
return EXIT_FAILURE;
}
- /* Check if we are properly installed. */
- if (euid != 0)
- error (FAIL_EXEC, 0, gettext ("needs to be installed setuid `root'"));
-
return EXIT_SUCCESS;
}

View file

@ -1,76 +0,0 @@
--- libc/elf/Makefile.aliasing~ 2012-12-02 22:11:45.000000000 +0100
+++ libc/elf/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -53,6 +53,7 @@ CFLAGS-dl-iterate-phdr.c = $(uses-callba
ifeq ($(unwind-find-fde),yes)
routines += unwind-dw2-fde-glibc
shared-only-routines += unwind-dw2-fde-glibc
+CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
endif
before-compile = $(objpfx)trusted-dirs.h
--- libc/inet/Makefile.aliasing~ 2012-08-28 16:14:43.000000000 +0200
+++ libc/inet/Makefile 2012-12-27 19:48:23.933089723 +0100
@@ -62,6 +62,8 @@ tests-$(OPTION_EGLIBC_ADVANCED_INET6) +=
include ../Rules
+CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
+
ifeq ($(have-thread-library),yes)
CFLAGS-gethstbyad_r.c = -fexceptions
--- libc/nis/Makefile.aliasing~ 2012-05-12 17:44:41.000000000 +0200
+++ libc/nis/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -80,6 +80,8 @@ libnss_nisplus-inhibit-o = $(filter-out
include ../Rules
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
+CFLAGS-ypclnt.c += -fno-strict-aliasing
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
--- libc/nss/Makefile.aliasing~ 2012-10-10 17:35:46.000000000 +0200
+++ libc/nss/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -147,6 +147,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
echo '#include "$<"') > $@.new
mv -f $@.new $@
+CFLAGS-files-hosts.c += -fno-strict-aliasing
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
--- libc/resolv/Makefile.aliasing~ 2012-10-25 19:18:12.000000000 +0200
+++ libc/resolv/Makefile 2012-12-27 19:46:13.396658450 +0100
@@ -83,6 +83,7 @@ ifeq (yes,$(have-ssp))
CFLAGS-libresolv += -fstack-protector
endif
CFLAGS-res_hconf.c = -fexceptions
+CFLAGS-res_send.c += -fno-strict-aliasing
# The BIND code elicits some harmless warnings.
+cflags += -Wno-strict-prototypes -Wno-write-strings
--- libc/sunrpc/Makefile.aliasing~ 2012-05-26 19:46:57.000000000 +0200
+++ libc/sunrpc/Makefile 2012-12-27 19:46:13.397658439 +0100
@@ -164,6 +164,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
CPPFLAGS += $(sunrpc-CPPFLAGS)
BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS)
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
+
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
--- libc/sysdeps/powerpc/powerpc64/Makefile.aliasing~ 2012-12-27 19:46:13.392658496 +0100
+++ libc/sysdeps/powerpc/powerpc64/Makefile 2012-12-27 19:46:13.397658439 +0100
@@ -37,6 +37,8 @@ CFLAGS-rtld-strnlen.os = $(no-special-re
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+CFLAGS-gmon-start.c += -fno-strict-aliasing
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing

View file

@ -1,9 +1,8 @@
diff -p -up glibc-2.8/po/fr.po.orig glibc-2.8/po/fr.po --- glibc-2.20/po/fr.po.ENOTTYfr~ 2014-09-08 21:27:29.600168512 +0200
--- glibc-2.8/po/fr.po.orig 2008-05-20 20:01:33.000000000 -0400 +++ glibc-2.20/po/fr.po 2014-09-08 21:28:29.519419418 +0200
+++ glibc-2.8/po/fr.po 2008-05-20 20:02:10.000000000 -0400 @@ -6029,7 +6029,7 @@ msgstr "Trop de fichiers ouverts dans le
@@ -5351,7 +5351,7 @@ msgstr "Trop de fichiers ouverts dans le
#. TRANS modes on an ordinary file. #. TRANS modes on an ordinary file.
#: sysdeps/gnu/errlist.c:285 #: sysdeps/gnu/errlist.c:286
msgid "Inappropriate ioctl for device" msgid "Inappropriate ioctl for device"
-msgstr "Ioctl() inappropré pour un périphérique" -msgstr "Ioctl() inappropré pour un périphérique"
+msgstr "Ioctl() inapproprié pour un périphérique" +msgstr "Ioctl() inapproprié pour un périphérique"

View file

@ -1,6 +1,6 @@
--- glibc-2.18/crypt/crypt-entry.c.relocateFcrypt~ 2013-08-17 14:44:36.146493787 +0200 --- glibc-2.23/crypt/crypt-entry.c.relocateFcrypt~ 2016-02-18 21:10:00.072228405 +0100
+++ glibc-2.18/crypt/crypt-entry.c 2013-08-17 14:44:42.994408176 +0200 +++ glibc-2.23/crypt/crypt-entry.c 2016-02-18 21:10:58.203506144 +0100
@@ -182,20 +182,3 @@ crypt (key, salt) @@ -168,18 +168,3 @@ crypt (const char *key, const char *salt
return __crypt_r (key, salt, &_ufc_foobar); return __crypt_r (key, salt, &_ufc_foobar);
} }
#endif #endif
@ -14,16 +14,14 @@
-weak_alias (crypt, fcrypt) -weak_alias (crypt, fcrypt)
-#else -#else
-char * -char *
-__fcrypt (key, salt) -__fcrypt (const char *key, const char *salt)
- const char *key;
- const char *salt;
-{ -{
- return crypt (key, salt); - return crypt (key, salt);
-} -}
-#endif -#endif
--- glibc-2.18/crypt/wrapper.c.relocateFcrypt~ 2013-08-17 14:44:36.143493824 +0200 --- glibc-2.23/crypt/wrapper.c.relocateFcrypt~ 2016-02-18 21:10:00.071228400 +0100
+++ glibc-2.18/crypt/wrapper.c 2013-08-17 14:44:36.146493787 +0200 +++ glibc-2.23/crypt/wrapper.c 2016-02-18 21:10:00.072228405 +0100
@@ -324,7 +324,6 @@ weak_alias(__crypt, crypt) @@ -325,7 +325,6 @@ weak_alias(__crypt, crypt)
weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn) weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn)
weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra) weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra)
weak_alias(__crypt_gensalt, crypt_gensalt) weak_alias(__crypt_gensalt, crypt_gensalt)

View file

@ -1,115 +0,0 @@
--- glibc-2.18/elf/rtld.c.hpt~ 2013-08-17 14:27:41.038184387 +0200
+++ glibc-2.18/elf/rtld.c 2013-08-17 14:29:31.166807590 +0200
@@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* Early statistics require high-precision timing */
+#define NEED_HP_TIMING_HWCAP_AVAIL 1
+
#include <errno.h>
#include <dlfcn.h>
#include <fcntl.h>
@@ -193,6 +196,12 @@ static void dl_main (const ElfW(Phdr) *p
static struct libname_list _dl_rtld_libname;
static struct libname_list _dl_rtld_libname2;
+/* Run-time detect availability of high-precision timer? */
+#ifdef HP_TIMING_HWCAP_AVAIL
+# undef HP_TIMING_AVAIL
+# define HP_TIMING_AVAIL HP_TIMING_HWCAP_AVAIL
+#endif
+
/* We expect less than a second for relocation. */
#ifdef HP_SMALL_TIMING_AVAIL
# undef HP_TIMING_AVAIL
@@ -315,9 +324,8 @@ _dl_start_final (void *arg, struct dl_st
#endif
-#if HP_TIMING_AVAIL
- HP_TIMING_NOW (GL(dl_cpuclock_offset));
-#endif
+ if (HP_TIMING_AVAIL)
+ HP_TIMING_NOW (GL(dl_cpuclock_offset));
/* Initialize the stack end variable. */
__libc_stack_end = __builtin_frame_address (0);
--- glibc-2.18/sysdeps/generic/ldsodefs.h.hpt~ 2013-08-11 00:52:55.000000000 +0200
+++ glibc-2.18/sysdeps/generic/ldsodefs.h 2013-08-17 14:27:41.153182949 +0200
@@ -321,7 +321,7 @@ struct rtld_global
/* The object to be initialized first. */
EXTERN struct link_map *_dl_initfirst;
-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
+#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL
/* Start time on CPU clock. */
EXTERN hp_timing_t _dl_cpuclock_offset;
#endif
@@ -534,7 +534,7 @@ struct rtld_global_ro
/* All search directories defined at startup. */
EXTERN struct r_search_path_elem *_dl_init_all_dirs;
-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
+#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL || defined HP_TIMING_HWCAP_AVAIL
/* Overhead of a high-precision timing measurement. */
EXTERN hp_timing_t _dl_hp_timing_overhead;
#endif
--- glibc-2.18/sysdeps/i386/i586/hp-timing.c.hpt~ 2013-08-17 14:27:41.153182949 +0200
+++ glibc-2.18/sysdeps/i386/i586/hp-timing.c 2013-08-17 14:27:41.153182949 +0200
@@ -0,0 +1,2 @@
+/* We can use the i686 implementation without changes. */
+#include <sysdeps/i386/i686/hp-timing.c>
--- glibc-2.18/sysdeps/i386/i586/hp-timing.h.hpt~ 2013-08-17 14:27:41.153182949 +0200
+++ glibc-2.18/sysdeps/i386/i586/hp-timing.h 2013-08-17 14:27:41.153182949 +0200
@@ -0,0 +1,43 @@
+#ifndef _HP_HWCAP_TIMING_H
+#define _HP_HWCAP_TIMING_H 1
+
+/* We can use the i686 implementation with slight changes. */
+#include <sysdeps/i386/i686/hp-timing.h>
+
+/* We need the definition of HWCAP_I386_TSC. */
+#include <sysdeps/i386/dl-hwcapinfo.h>
+
+/* We need to perform a runtime check for the timestamp register. */
+#undef HP_TIMING_AVAIL
+#define HP_TIMING_AVAIL (0)
+
+/* HP_TIMING_HWCAP_AVAIL: this macro performs a run-time check for the
+ capability. */
+#define HP_TIMING_HWCAP_AVAIL (_dl_hp_timing_avail())
+
+/* Perform the TSC check. */
+#ifdef NEED_HP_TIMING_HWCAP_AVAIL
+static inline
+unsigned int
+_dl_cpuid_edx (unsigned int op)
+{
+ unsigned int edx;
+ __asm__ __volatile__("push %%ebx ; cpuid ; pop %%ebx"
+ : "=d" (edx) : "a" (op) : "ecx");
+ return edx;
+}
+
+static int
+internal_function
+_dl_hp_timing_avail (void)
+{
+ static int has_tsc = -1;
+
+ if (__builtin_expect (has_tsc == -1, 0))
+ has_tsc = (_dl_cpuid_edx(1) & HWCAP_I386_TSC) == HWCAP_I386_TSC;
+
+ return has_tsc;
+}
+#endif
+
+#endif /* hp-timing.h */
--- glibc-2.18/sysdeps/i386/i586/Makefile.hpt~ 2013-08-17 14:27:41.153182949 +0200
+++ glibc-2.18/sysdeps/i386/i586/Makefile 2013-08-17 14:27:41.153182949 +0200
@@ -0,0 +1,4 @@
+ifeq ($(subdir),csu)
+sysdep_routines += hp-timing
+static-only-routines += hp-timing
+endif

View file

@ -1,11 +1,6 @@
2003-08-29 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> --- glibc-2.24/sysdeps/i386/dl-machine.h.0072~ 2016-08-02 04:01:36.000000000 +0200
+++ glibc-2.24/sysdeps/i386/dl-machine.h 2016-08-17 16:58:27.711996583 +0200
* sysdeps/i386/dl-machine.h (dl_platform_init): Avoid i686 @@ -226,6 +226,9 @@ _dl_start_user:\n\
libraries to be loaded if the host doesn't support CMOV.
--- glibc-2.3.3/sysdeps/i386/dl-machine.h.i586-if-no-cmov 2004-06-03 01:21:36.000000000 +0200
+++ glibc-2.3.3/sysdeps/i386/dl-machine.h 2004-06-03 07:09:51.518703634 +0200
@@ -347,6 +347,9 @@ _dl_start_user:\n\
Prelinked libraries may use Elf32_Rela though. */ Prelinked libraries may use Elf32_Rela though. */
#define ELF_MACHINE_PLT_REL 1 #define ELF_MACHINE_PLT_REL 1
@ -15,16 +10,16 @@
/* We define an initialization functions. This is called very early in /* We define an initialization functions. This is called very early in
_dl_sysdep_start. */ _dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init () #define DL_PLATFORM_INIT dl_platform_init ()
@@ -357,6 +360,12 @@ dl_platform_init (void) @@ -241,6 +244,12 @@ dl_platform_init (void)
if (GLRO(dl_platform) != NULL && *GLRO(dl_platform) == '\0') /* init_cpu_features has been called early from __libc_start_main in
/* Avoid an empty string which would disturb us. */ static executable. */
GLRO(dl_platform) = NULL; init_cpu_features (&GLRO(dl_x86_cpu_features));
+ +
+ if (GLRO(dl_platform) != NULL + if (GLRO(dl_platform) != NULL
+ && GLRO(dl_platform)[1] >= '6' && (GLRO(dl_hwcap) & HWCAP_I386_CMOV) == 0) + && GLRO(dl_platform)[1] >= '6' && (GLRO(dl_hwcap) & HWCAP_I386_CMOV) == 0)
+ /* Avoid i686 compiled libraries to be loaded if the host doesn't + /* Avoid i686 compiled libraries to be loaded if the host doesn't
+ support CMOV instructions. */ + support CMOV instructions. */
+ GLRO(dl_platform) = "i586"; + GLRO(dl_platform) = "i586";
#endif
} }
static inline Elf32_Addr

View file

@ -1,15 +1,17 @@
--- glibc-2.18/crypt/crypt-entry.c.owlCrypt~ 2013-08-11 00:52:55.000000000 +0200 --- glibc-2.23/crypt/crypt-entry.c.owlCrypt~ 2016-02-18 18:54:00.000000000 +0100
+++ glibc-2.18/crypt/crypt-entry.c 2013-08-17 14:39:14.300517415 +0200 +++ glibc-2.23/crypt/crypt-entry.c 2016-02-18 21:09:26.589068442 +0100
@@ -81,7 +81,7 @@ extern struct crypt_data _ufc_foobar; @@ -71,8 +71,8 @@ extern struct crypt_data _ufc_foobar;
*/ */
char * char *
-__crypt_r (key, salt, data) -__crypt_r (const char *key, const char *salt,
+__des_crypt_r (key, salt, data) - struct crypt_data * __restrict data)
const char *key; +__des_crypt_r (const char *key, const char *salt,
const char *salt; + struct crypt_data * __restrict data)
struct crypt_data * __restrict data; {
@@ -155,6 +155,7 @@ __crypt_r (key, salt, data) ufc_long res[4];
char ktab[9];
@@ -143,6 +143,7 @@ __crypt_r (const char *key, const char *
_ufc_output_conversion_r (res[0], res[1], salt, data); _ufc_output_conversion_r (res[0], res[1], salt, data);
return data->crypt_3_buf; return data->crypt_3_buf;
} }
@ -17,7 +19,7 @@
weak_alias (__crypt_r, crypt_r) weak_alias (__crypt_r, crypt_r)
char * char *
@@ -180,6 +181,7 @@ crypt (key, salt) @@ -166,6 +167,7 @@ crypt (const char *key, const char *salt
return __crypt_r (key, salt, &_ufc_foobar); return __crypt_r (key, salt, &_ufc_foobar);
} }
@ -25,11 +27,11 @@
/* /*
--- glibc-2.18/crypt/Makefile.owlCrypt~ 2013-08-17 14:38:07.574351607 +0200 --- glibc-2.23/crypt/Makefile.owlCrypt~ 2016-02-18 18:54:00.000000000 +0100
+++ glibc-2.18/crypt/Makefile 2013-08-17 14:40:27.546601713 +0200 +++ glibc-2.23/crypt/Makefile 2016-02-18 21:08:03.819673066 +0100
@@ -20,13 +20,13 @@ @@ -22,13 +22,13 @@ subdir := crypt
#
subdir := crypt include ../Makeconfig
-headers := crypt.h -headers := crypt.h
+headers := crypt.h gnu-crypt.h ow-crypt.h +headers := crypt.h gnu-crypt.h ow-crypt.h
@ -43,8 +45,8 @@
tests := cert md5c-test sha256c-test sha512c-test badsalttest tests := cert md5c-test sha256c-test sha512c-test badsalttest
--- glibc-2.18/crypt/Versions.owlCrypt~ 2013-08-11 00:52:55.000000000 +0200 --- glibc-2.23/crypt/Versions.owlCrypt~ 2016-02-18 18:54:00.000000000 +0100
+++ glibc-2.18/crypt/Versions 2013-08-17 14:38:07.574351607 +0200 +++ glibc-2.23/crypt/Versions 2016-02-18 21:08:03.819673066 +0100
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
libcrypt { libcrypt {
GLIBC_2.0 { GLIBC_2.0 {

View file

@ -29,7 +29,7 @@
+#include "crypt_freesec.h" +#include "crypt_freesec.h"
+ +
+#include <signal.h> +#include <signal.h>
+#include <bits/libc-lock.h> +#include <libc-lock.h>
+ +
+__libc_lock_define_initialized (static, _crypt_extended_init_lock) +__libc_lock_define_initialized (static, _crypt_extended_init_lock)
+ +

View file

@ -1,11 +1,11 @@
--- libc/scripts/check-local-headers.sh.multiarch~ 2012-11-17 18:50:14.000000000 +0100 --- glibc-2.24/scripts/check-local-headers.sh.biarch~ 2016-08-17 16:52:14.092668284 +0200
+++ libc/scripts/check-local-headers.sh 2012-12-27 20:01:52.821383910 +0100 +++ glibc-2.24/scripts/check-local-headers.sh 2016-08-17 16:55:02.911984338 +0200
@@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir" @@ -33,7 +33,7 @@ exec ${AWK} -v includedir="$includedir"
BEGIN { BEGIN {
status = 0 status = 0
exclude = "^" includedir \ exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" - "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|multiarch-|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)" + "/(.*-.*-.*/|.*-.*/|)(asm[-/]|arch|linux/|selinux/|mach/|device/|hurd/(((hurd|ioctl)_types|paths)\\.h|ioctls\\.defs|ihash\\.h)|cthreads\\.h|multiarch-|gd|nss3/|c\\+\\+/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
} }
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 } /^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{ {

View file

@ -1,19 +1,9 @@
pt_BR i18n fixes from glibc-2.3.4-77143cl.src.rpm (Conectiva Linux) --- glibc-2.21/po/pt_BR.po.ptBR~ 2015-02-07 14:28:42.147072936 +0100
+++ glibc-2.21/po/pt_BR.po 2015-02-07 14:29:29.831312393 +0100
--- glibc-2.3.6/po/pt_BR.po.orig 2006-04-17 04:47:44.000000000 -0300 @@ -4693,11 +4693,14 @@ msgstr ""
+++ glibc-2.3.6/po/pt_BR.po 2006-04-17 04:48:03.000000000 -0300
@@ -84,6 +84,7 @@
msgstr "\t[%u] - [%u bytes] "
#: nscd/nscd_stat.c:153
+#, c-format
msgid ""
"\n"
"%s cache:\n"
@@ -103,11 +104,14 @@
"cache %s:\n" "cache %s:\n"
"\n" "\n"
"%15s cache está habilitado\n" "%15s cache está habilitado\n"
-"%15Zd tamanho sugerido%15ld segundos de vida para entradas positivas\n" -"%15Zd tamanho sugerido%15ld segundos de vida para entradas positivas\n"
+"%15Zd tamanho sugerido\n" +"%15Zd tamanho sugerido\n"
+"%15ld segundos de vida para entradas positivas\n" +"%15ld segundos de vida para entradas positivas\n"
@ -21,9 +11,9 @@ pt_BR i18n fixes from glibc-2.3.4-77143cl.src.rpm (Conectiva Linux)
"%15ld hits do cache para entradas positivas\n" "%15ld hits do cache para entradas positivas\n"
"%15ld hits do cache para entradas negativas\n" "%15ld hits do cache para entradas negativas\n"
-"%15ld%% quantidade de hits no cache\n" -"%15ld%% quantidade de hits no cache\n"
+"%15ld ausências no cache para entradas positivas\n" +"%15ld ausências no cache para entradas positivas\n"
+"%15ld ausências no cache para entradas negativas\n" +"%15ld ausências no cache para entradas negativas\n"
+"%15ld%% taxa de hits no cache\n" +"%15ld%% taxa de hits no cache\n"
"%15s verifique o arquivo /etc/%s para mudanças\n" "%15s verifique o arquivo /etc/%s para mudanças\n"
#: nis/nis_print.c:251 #: nscd/pwdcache.c:428

View file

@ -1,22 +0,0 @@
--- glibc-2.16.90-97bc38d7/Makeconfig.orig 2012-09-26 13:48:22.726000556 -0300
+++ glibc-2.16.90-97bc38d7/Makeconfig 2012-09-26 13:48:36.276000993 -0300
@@ -216,7 +216,7 @@ inst_zonedir = $(install_root)$(zonedir)
# Where to install the locale files.
ifndef localedir
-localedir = $(libdir)/locale
+localedir = $(datadir)/locale
endif
inst_localedir = $(install_root)$(localedir)
--- glibc-2.16.90-97bc38d7/sysdeps/gnu/configure.ac.orig 2012-09-27 13:08:49.949074767 -0300
+++ glibc-2.16.90-97bc38d7/sysdeps/gnu/configure.ac 2012-09-27 13:09:22.748076063 -0300
@@ -18,7 +18,7 @@ case "$prefix" in
if test "$libdir" = '${exec_prefix}/lib'; then
libdir='${exec_prefix}/lib64';
# Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
+ libc_cv_localedir='${exec_prefix}/share/locale'
fi
;;
*)

View file

@ -1,44 +0,0 @@
--- glibc-2.16.90-97bc38d7/misc/tst-error1.c.orig 2012-09-26 15:21:29.672179348 -0300
+++ glibc-2.16.90-97bc38d7/misc/tst-error1.c 2012-09-26 15:21:59.422180301 -0300
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
for (int i = 0; i < 1000; ++i)
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
error (0, 0, str);
- error (0, 0, buf);
- error (0, 0, buf);
+ error (0, 0, "%s", buf);
+ error (0, 0, "%s", buf);
error (0, 0, str);
return 0;
}
--- glibc-2.16.90-97bc38d7/posix/regexbug1.c.orig 2012-09-26 15:23:13.175182590 -0300
+++ glibc-2.16.90-97bc38d7/posix/regexbug1.c 2012-09-26 15:23:32.198183235 -0300
@@ -18,7 +18,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
@@ -35,7 +35,7 @@ main (void)
{
char buf[100];
regerror (reerr, &re, buf, sizeof buf);
- error (EXIT_FAILURE, 0, buf);
+ error (EXIT_FAILURE, 0, "%s", buf);
}
if (regexec (&re, "002", 2, ma, 0) != 0)
--- glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c.orig 2012-09-26 15:23:52.887183970 -0300
+++ glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c 2012-09-26 15:24:13.870184603 -0300
@@ -92,7 +92,7 @@ main (void)
fprintf (fp, "%s", large);
fprintf (fp, "%.*s", 30000, large);
large[20000] = '\0';
- fprintf (fp, large);
+ fprintf (fp, "%s", large);
fprintf (fp, "%-1.300000000s", "hello");
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)

View file

@ -1,18 +1,19 @@
--- glibc-2.18/stdlib/Makefile.ldbl~ 2013-08-17 14:29:53.818524404 +0200 --- glibc-2.20/stdlib/Makefile.ldbl~ 2014-09-08 21:30:48.771678525 +0200
+++ glibc-2.18/stdlib/Makefile 2013-08-17 14:36:20.568689362 +0200 +++ glibc-2.20/stdlib/Makefile 2014-09-08 21:34:51.842639720 +0200
@@ -130,9 +130,15 @@ ifeq ($(run-built-tests),yes) @@ -125,9 +125,16 @@ test-canon-ARGS = --test-dir=${common-ob
tests: $(objpfx)tst-fmtmsg.out
endif bug-fmtmsg1-ENV = SEV_LEVEL=foo,11,newsev
+isomac-includes = -I../include $(+sysdep-includes) $(sysincludes) -I.. +isomac-includes = -I../include $(+sysdep-includes) $(sysincludes) -I..
+ifeq (powerpc:8, $(base-machine):$(sizeof-long-double)) +ifeq (powerpc:8, $(base-machine):$(sizeof-long-double))
+# XXX only necessary for bootstrapping... +# XXX only necessary for bootstrapping...
+isomac-includes += -I../libio -I../stdlib -I../wcsmbs +isomac-includes += -I../libio -I../stdlib -I../wcsmbs
+endif +endif
+
$(objpfx)isomac.out: $(objpfx)isomac $(objpfx)isomac.out: $(objpfx)isomac
$(dir $<)$(notdir $<) '$(CC)' \ $(dir $<)$(notdir $<) '$(CC)' \
'-I../include $(+sysdep-includes) $(sysincludes) -I..' > $<.out '-I../include $(+sysdep-includes) $(sysincludes) -I..' > $<.out; \
+ '$(isomac-includes)' > $<.out + '$(isomac-includes)' > $<.out \
$(evaluate-test)
isomac-CFLAGS = -O isomac-CFLAGS = -O
$(objpfx)isomac: isomac.c

View file

@ -1,11 +1,9 @@
diff --git a/configure.ac b/configure.ac --- glibc-2.21/configure.ac.gold~ 2015-02-07 14:30:19.652562579 +0100
index d369382..ffc6151 100644 +++ glibc-2.21/configure.ac 2015-02-07 14:31:12.232826621 +0100
--- a/configure.ac @@ -912,6 +912,16 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
+++ b/configure.ac
@@ -924,6 +924,16 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
AC_CHECK_PROG_VER(AS, $AS, --version,
[GNU assembler.* \([0-9]*\.[0-9.]*\)], [GNU assembler.* \([0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as") [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
AS=: critic_missing="$critic_missing as")
+# If the system defaulted to using gold, and the compiler has suggested +# If the system defaulted to using gold, and the compiler has suggested
+# we use a linker that is actually gold, then we ignore the suggestion +# we use a linker that is actually gold, then we ignore the suggestion
+# and use ld.bfd instead. This won't fix the implicit uses of gold by +# and use ld.bfd instead. This won't fix the implicit uses of gold by
@ -18,4 +16,4 @@ index d369382..ffc6151 100644
+fi +fi
AC_CHECK_PROG_VER(LD, $LD, --version, AC_CHECK_PROG_VER(LD, $LD, --version,
[GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld") [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],

View file

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAABAgAGBQJS9Q/LAAoJECXvCkNsKkr/tgEH+wf5M8BU9gbVncXh5mikpKIe
V81RjOJVP0TI8ix7Eq+GHqPVDDVCHupX81u87VbETRd+8sJMlXQa1fep0y7T8GV4
LiapkkBPbC7wGQ6h1jpDE4hQhCiHLYWgDgGhj6qtTQIvhqR5/B5927UKfw7imhHD
805UZdO8ryHCWbWAeOljPA3spz0DKtUe/eskWFEdBparSbpEEmaQiHlT+6mGy4Xy
mUe0BqXSWFFq/gmZT7DpJxAW7WnO8iwc2/NUli/dl1dSd2cMHlEJ96ZcJ4NKKf7j
AxaVwLr6zgyfORaEt28+JAf8nDXIsztTqtNBU5YrJpMmYo0e9v/Zao0G+zbIsWo=
=IQM8
-----END PGP SIGNATURE-----

View file

@ -1,47 +1,42 @@
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001 #
From: Andreas Schwab <schwab@redhat.com> # Upstream discussions:
Date: Fri, 11 Jun 2010 11:04:11 +0200 # https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
Subject: [PATCH] Properly set __libc_multiple_libcs #
# Based on the following commit:
* elf/rtld.c (_dl_starting_up): Always define. #
(dl_main): Always set _dl_starting_up. # From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
* elf/dl-support.c (_dl_starting_up): Always define. # From: Andreas Schwab <schwab@redhat.com>
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up. # Date: Fri, 11 Jun 2010 11:04:11 +0200
# Subject: [PATCH] Properly set __libc_multiple_libcs
--- #
ChangeLog | 7 +++++++ # * elf/rtld.c (_dl_starting_up): Always define.
elf/dl-init.c | 4 ---- # (dl_main): Always set _dl_starting_up.
elf/dl-support.c | 2 -- # * elf/dl-support.c (_dl_starting_up): Always define.
elf/rtld.c | 4 ---- # * elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
4 files changed, 7 insertions(+), 10 deletions(-) #
# ---
--- a/elf/dl-init.c # ChangeLog | 7 +++++++
+++ b/elf/dl-init.c # elf/dl-init.c | 4 ----
@@ -23,11 +23,9 @@ # elf/dl-support.c | 2 --
/* Type of the initializer. */ # elf/rtld.c | 4 ----
typedef void (*init_t) (int, char **, char **); # 4 files changed, 7 insertions(+), 10 deletions(-)
#
-#ifndef HAVE_INLINED_SYSCALLS diff -urN glibc-2.20-205-ga39208b/elf/dl-init.c glibc-2.20-205-ga39208b.mod/elf/dl-init.c
/* Flag, nonzero during startup phase. */ --- glibc-2.20-205-ga39208b/elf/dl-init.c 2014-11-21 16:08:32.744913590 -0500
extern int _dl_starting_up; +++ glibc-2.20-205-ga39208b.mod/elf/dl-init.c 2014-11-21 16:09:42.485708197 -0500
extern int _dl_starting_up_internal attribute_hidden; @@ -119,8 +119,6 @@
-#endif
static void
@@ -132,9 +130,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
while (i-- > 0) while (i-- > 0)
call_init (main_map->l_initfini[i], argc, argv, env); call_init (main_map->l_initfini[i], argc, argv, env);
-#ifndef HAVE_INLINED_SYSCALLS -#ifndef HAVE_INLINED_SYSCALLS
/* Finished starting up. */ /* Finished starting up. */
INTUSE(_dl_starting_up) = 0; _dl_starting_up = 0;
-#endif -#endif
} }
INTDEF (_dl_init) diff -urN glibc-2.20-205-ga39208b/elf/dl-support.c glibc-2.20-205-ga39208b.mod/elf/dl-support.c
--- a/elf/dl-support.c --- glibc-2.20-205-ga39208b/elf/dl-support.c 2014-11-19 14:35:03.000000000 -0500
+++ b/elf/dl-support.c +++ glibc-2.20-205-ga39208b.mod/elf/dl-support.c 2014-11-21 16:09:54.829671843 -0500
@@ -81,10 +81,8 @@ unsigned long long _dl_load_adds; @@ -118,10 +118,8 @@
.r_nlist = 1, .r_nlist = 1,
}; };
@ -52,9 +47,10 @@ Subject: [PATCH] Properly set __libc_multiple_libcs
/* Random data provided by the kernel. */ /* Random data provided by the kernel. */
void *_dl_random; void *_dl_random;
--- a/elf/rtld.c diff -urN glibc-2.20-205-ga39208b/elf/rtld.c glibc-2.20-205-ga39208b.mod/elf/rtld.c
+++ b/elf/rtld.c --- glibc-2.20-205-ga39208b/elf/rtld.c 2014-11-21 16:08:32.745913587 -0500
@@ -106,7 +106,6 @@ static struct audit_list +++ glibc-2.20-205-ga39208b.mod/elf/rtld.c 2014-11-21 16:09:05.614816785 -0500
@@ -107,7 +107,6 @@
struct audit_list *next; struct audit_list *next;
} *audit_list; } *audit_list;
@ -62,21 +58,21 @@ Subject: [PATCH] Properly set __libc_multiple_libcs
/* Set nonzero during loading and initialization of executable and /* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic must not be initialized to nonzero, because the unused dynamic
@@ -116,7 +115,6 @@ static struct audit_list @@ -117,7 +116,6 @@
never be called. */ never be called. */
int _dl_starting_up = 0; int _dl_starting_up = 0;
INTVARDEF(_dl_starting_up) rtld_hidden_def (_dl_starting_up)
-#endif -#endif
/* This is the structure which defines all variables global to ld.so /* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */ (except those which cannot be added for some reason). */
@@ -929,10 +927,8 @@ dl_main (const ElfW(Phdr) *phdr, @@ -776,10 +774,8 @@
/* Process the environment variable which control the behaviour. */ /* Process the environment variable which control the behaviour. */
process_envvars (&mode); process_envvars (&mode);
-#ifndef HAVE_INLINED_SYSCALLS -#ifndef HAVE_INLINED_SYSCALLS
/* Set up a flag which tells we are just starting. */ /* Set up a flag which tells we are just starting. */
INTUSE(_dl_starting_up) = 1; _dl_starting_up = 1;
-#endif -#endif
if (*user_entry == (ElfW(Addr)) ENTRY_POINT) if (*user_entry == (ElfW(Addr)) ENTRY_POINT)

View file

@ -31,7 +31,7 @@ index 18a83d2..6e16a9a 100644
&& (!is_path || name[len] != ':')) && (!is_path || name[len] != ':'))
return 0; return 0;
- if (__builtin_expect (secure, 0) - if (__glibc_unlikely (secure)
- && ((name[len] != '\0' && name[len] != '/' - && ((name[len] != '\0' && name[len] != '/'
- && (!is_path || name[len] != ':')) - && (!is_path || name[len] != ':'))
- || (name != start + 1 && (!is_path || name[-2] != ':')))) - || (name != start + 1 && (!is_path || name[-2] != ':'))))
@ -48,7 +48,7 @@ index 18a83d2..6e16a9a 100644
- is $ORIGIN alone) and it must always appear first in path. */ - is $ORIGIN alone) and it must always appear first in path. */
++name; ++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path, - if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0 - __libc_enable_secure)) != 0
- || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0 - || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
- || (len = is_dst (start, name, "LIB", is_path, 0)) != 0) - || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0 + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0
@ -62,13 +62,13 @@ index 18a83d2..6e16a9a 100644
++name; ++name;
- if ((len = is_dst (start, name, "ORIGIN", is_path, - if ((len = is_dst (start, name, "ORIGIN", is_path,
- INTUSE(__libc_enable_secure))) != 0) - __libc_enable_secure)) != 0)
+ if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0) + if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
{ {
- repl = l->l_origin; - repl = l->l_origin;
+ /* For SUID/GUID programs $ORIGIN must always appear + /* For SUID/GUID programs $ORIGIN must always appear
+ first in a path element. */ + first in a path element. */
+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0) + if (__glibc_unlikely (__libc_enable_secure)
+ && ((name[len] != '\0' && name[len] != '/' + && ((name[len] != '\0' && name[len] != '/'
+ && (!is_path || name[len] != ':')) + && (!is_path || name[len] != ':'))
+ || (name != start + 1 && (!is_path || name[-2] != ':')))) + || (name != start + 1 && (!is_path || name[-2] != ':'))))
@ -76,11 +76,11 @@ index 18a83d2..6e16a9a 100644
+ else + else
+ repl = l->l_origin; + repl = l->l_origin;
+ +
check_for_trusted = (INTUSE(__libc_enable_secure) check_for_trusted = (__libc_enable_secure
&& l->l_type == lt_executable); && l->l_type == lt_executable);
} }
@@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result, @@ -351,9 +348,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
check_for_trusted = (INTUSE(__libc_enable_secure) check_for_trusted = (__libc_enable_secure
&& l->l_type == lt_executable); && l->l_type == lt_executable);
} }
- else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0) - else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)

View file

@ -1,45 +0,0 @@
From 70d0a630700f602a457832383161d261fe222db5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 1 Jul 2010 13:14:26 +0200
Subject: [PATCH] Fix PLT reference
* include/sys/resource.h (__getrlimit): Add hidden proto.
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
* resource/getrlimit.c: Likewise.
---
ChangeLog | 7 +++++++
include/sys/resource.h | 1 +
resource/getrlimit.c | 1 +
sysdeps/mach/hurd/getrlimit.c | 1 +
sysdeps/unix/sysv/linux/i386/getrlimit.c | 1 +
5 files changed, 11 insertions(+), 0 deletions(-)
--- a/include/sys/resource.h
+++ b/include/sys/resource.h
@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
extern int __setrlimit (enum __rlimit_resource __resource,
const struct rlimit *__rlimits);
+libc_hidden_proto (__getrlimit)
#endif
#endif
--- a/resource/getrlimit.c
+++ b/resource/getrlimit.c
@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)
stub_warning (getrlimit)
--- a/sysdeps/mach/hurd/getrlimit.c
+++ b/sysdeps/mach/hurd/getrlimit.c
@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
return 0;
}
+libc_hidden_def (__getrlimit)
weak_alias (__getrlimit, getrlimit)

View file

@ -7,5 +7,5 @@ diff -Nrup a/localedata/Makefile b/localedata/Makefile
$(LOCALEDEF) --alias-file=../intl/locale.alias \ $(LOCALEDEF) --alias-file=../intl/locale.alias \
+ --no-archive \ + --no-archive \
-i locales/$$input -c -f charmaps/$$charset \ -i locales/$$input -c -f charmaps/$$charset \
$(addprefix --prefix=,$(install_root)) $$locale; \ $(addprefix --prefix=,$(install_root)) $$locale \
echo ' done'; \ && echo ' done'; \

View file

@ -4,7 +4,7 @@ diff -Nrup a/nptl/Makefile b/nptl/Makefile
@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \ @@ -529,15 +529,19 @@ $(addprefix $(objpfx), \
$(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \ $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \
$(objpfx)libpthread_nonshared.a $(objpfx)libpthread_nonshared.a
$(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so $(objpfx)tst-unload: $(libdl)
-# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so, -# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so, +# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
# since otherwise libpthread.so comes before libc.so when linking. # since otherwise libpthread.so comes before libc.so when linking.

View file

@ -1,20 +0,0 @@
glibc-2.3.3-1478-g37582bc
* Thu Nov 30 2006 Jakub Jelinek <jakub@redhat.com> 2.5.90-9
- on ppc64 build __libc_start_main without unwind info,
as it breaks MD_FROB_UPDATE_CONTEXT (#217729, #217775; in the
future that could be fixable just by providing .cfi_undefined r2
in __libc_start_main instead)
diff -Nrup a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
--- a/sysdeps/powerpc/powerpc64/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/sysdeps/powerpc/powerpc64/Makefile 2012-06-07 12:15:21.828318633 -0600
@@ -35,6 +35,8 @@ CFLAGS-rtld-memmove.os = $(no-special-re
CFLAGS-rtld-memchr.os = $(no-special-regs)
CFLAGS-rtld-strnlen.os = $(no-special-regs)
+CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing

View file

@ -1,61 +0,0 @@
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Thu, 8 Apr 2010 11:18:26 +0200
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
GLIBC_PRIVATE.
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
---
ChangeLog | 8 ++++++++
nptl/Versions | 1 +
nptl/nptl-init.c | 2 +-
nptl/sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
nptl/sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
5 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/Versions
--- a/nptl/Version
+++ b/nptl/Versions
@@ -30,6 +30,7 @@ libc {
__libc_alloca_cutoff;
# Internal libc interface to libpthread
__libc_dl_error_tsd;
+ __getrlimit;
}
}
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
/* Determine the default allowed stack size. This is the size used
in case the user does not specify one. */
struct rlimit limit;
- if (getrlimit (RLIMIT_STACK, &limit) != 0
+ if (__getrlimit (RLIMIT_STACK, &limit) != 0
|| limit.rlim_cur == RLIM_INFINITY)
/* The system limit is not usable. Use an architecture-specific
default. */
--- a/nptl/sysdeps/unix/sysv/linux/i386/Versions
+++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+ GLIBC_PRIVATE {
+ # Internal libc interface to libpthread
+ __uname;
+ }
+}
--- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h
@@ -36,7 +36,7 @@ is_smp_system (void)
char *cp;
/* Try reading the number using `sysctl' first. */
- if (uname (&u.uts) == 0)
+ if (__uname (&u.uts) == 0)
cp = u.uts.version;
else
{

View file

@ -1,163 +0,0 @@
#
# commit a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c
# Author: Carlos O'Donell <carlos@redhat.com>
# Date: Wed Nov 19 11:44:12 2014 -0500
#
# CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.
#
# The function wordexp() fails to properly handle the WRDE_NOCMD
# flag when processing arithmetic inputs in the form of "$((... ``))"
# where "..." can be anything valid. The backticks in the arithmetic
# epxression are evaluated by in a shell even if WRDE_NOCMD forbade
# command substitution. This allows an attacker to attempt to pass
# dangerous commands via constructs of the above form, and bypass
# the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD
# in exec_comm(), the only place that can execute a shell. All other
# checks for WRDE_NOCMD are superfluous and removed.
#
# We expand the testsuite and add 3 new regression tests of roughly
# the same form but with a couple of nested levels.
#
# On top of the 3 new tests we add fork validation to the WRDE_NOCMD
# testing. If any forks are detected during the execution of a wordexp()
# call with WRDE_NOCMD, the test is marked as failed. This is slightly
# heuristic since vfork might be used in the future, but it provides a
# higher level of assurance that no shells were executed as part of
# command substitution with WRDE_NOCMD in effect. In addition it doesn't
# require libpthread or libdl, instead we use the public implementation
# namespace function __register_atfork (already part of the public ABI
# for libpthread).
#
# Tested on x86_64 with no regressions.
#
diff --git glibc-2.17-c758a686/posix/wordexp-test.c glibc-2.17-c758a686/posix/wordexp-test.c
index 4957006..bdd65e4 100644
--- glibc-2.17-c758a686/posix/wordexp-test.c
+++ glibc-2.17-c758a686/posix/wordexp-test.c
@@ -27,6 +27,25 @@
#define IFS " \n\t"
+extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
+extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
+
+static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
+{
+ return __register_atfork (prepare, parent, child,
+ &__dso_handle == NULL ? NULL : __dso_handle);
+}
+
+/* Number of forks seen. */
+static int registered_forks;
+
+/* For each fork increment the fork count. */
+static void
+register_fork (void)
+{
+ registered_forks++;
+}
+
struct test_case_struct
{
int retval;
@@ -206,6 +225,12 @@ struct test_case_struct
{ WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
{ WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
{ WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
+ /* Test for CVE-2014-7817. We test 3 combinations of command
+ substitution inside an arithmetic expression to make sure that
+ no commands are executed and error is returned. */
+ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
+ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
+ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
{ -1, NULL, NULL, 0, 0, { NULL, }, IFS },
};
@@ -258,6 +283,15 @@ main (int argc, char *argv[])
return -1;
}
+ /* If we are not allowed to do command substitution, we install
+ fork handlers to verify that no forks happened. No forks should
+ happen at all if command substitution is disabled. */
+ if (__app_register_atfork (register_fork, NULL, NULL) != 0)
+ {
+ printf ("Failed to register fork handler.\n");
+ return -1;
+ }
+
for (test = 0; test_case[test].retval != -1; test++)
if (testit (&test_case[test]))
++fail;
@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
printf ("Test %d (%s): ", ++tests, tc->words);
+ if (tc->flags & WRDE_NOCMD)
+ registered_forks = 0;
+
if (tc->flags & WRDE_APPEND)
{
/* initial wordexp() call, to be appended to */
@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
}
retval = wordexp (tc->words, &we, tc->flags);
+ if ((tc->flags & WRDE_NOCMD)
+ && (registered_forks > 0))
+ {
+ printf ("FAILED fork called for WRDE_NOCMD\n");
+ return 1;
+ }
+
if (tc->flags & WRDE_DOOFFS)
start_offs = sav_we.we_offs;
diff --git glibc-2.17-c758a686/posix/wordexp.c glibc-2.17-c758a686/posix/wordexp.c
index b6b65dd..26f3a26 100644
--- glibc-2.17-c758a686/posix/wordexp.c
+++ glibc-2.17-c758a686/posix/wordexp.c
@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
pid_t pid;
int noexec = 0;
+ /* Do nothing if command substitution should not succeed. */
+ if (flags & WRDE_NOCMD)
+ return WRDE_CMDSUB;
+
/* Don't fork() unless necessary */
if (!comm || !*comm)
return 0;
@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word_length, size_t *max_length,
}
}
- if (flags & WRDE_NOCMD)
- return WRDE_CMDSUB;
-
(*offset) += 2;
return parse_comm (word, word_length, max_length, words, offset, flags,
quoted? NULL : pwordexp, ifs, ifs_white);
@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_length, size_t *max_length,
break;
case '`':
- if (flags & WRDE_NOCMD)
- return WRDE_CMDSUB;
-
++(*offset);
error = parse_backtick (word, word_length, max_length, words,
offset, flags, NULL, NULL, NULL);
@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
break;
case '`':
- if (flags & WRDE_NOCMD)
- {
- error = WRDE_CMDSUB;
- goto do_error;
- }
-
++words_offset;
error = parse_backtick (&word, &word_length, &max_length, words,
&words_offset, flags, pwordexp, ifs,

View file

@ -1,18 +0,0 @@
commit f9d2d03254a58d92635a311a42253eeed5a40a47
Author: Andreas Schwab <schwab@suse.de>
Date: Mon May 26 18:01:31 2014 +0200
Fix invalid file descriptor reuse while sending DNS query (BZ #15946)
diff --git glibc-2.17-c758a686/resolv/res_send.c glibc-2.17-c758a686/resolv/res_send.c
index 3273d55..af42b8a 100644
--- glibc-2.17-c758a686/resolv/res_send.c
+++ glibc-2.17-c758a686/resolv/res_send.c
@@ -1410,6 +1410,7 @@ send_dg(res_state statp,
retval = reopen (statp, terrno, ns);
if (retval <= 0)
return retval;
+ pfd[0].fd = EXT(statp).nssocks[ns];
}
}
goto wait;

View file

@ -1,20 +0,0 @@
commit 2959eda9272a033863c271aff62095abd01bd4e3
Author: Arjun Shankar <arjun.is@lostca.se>
Date: Tue Apr 21 14:06:31 2015 +0200
CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow [BZ#18287]
diff --git glibc-2.17-c758a686/resolv/nss_dns/dns-host.c glibc-2.17-c758a686/resolv/nss_dns/dns-host.c
index b16b0dd..d8c5579 100644
--- glibc-2.17-c758a686/resolv/nss_dns/dns-host.c
+++ glibc-2.17-c758a686/resolv/nss_dns/dns-host.c
@@ -613,7 +613,8 @@
int have_to_map = 0;
uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
buffer += pad;
- if (__builtin_expect (buflen < sizeof (struct host_data) + pad, 0))
+ buflen = buflen > pad ? buflen - pad : 0;
+ if (__builtin_expect (buflen < sizeof (struct host_data), 0))
{
/* The buffer is too small. */
too_small:

View file

@ -1,542 +0,0 @@
diff -Naur glibc-2.19.orig/resolv/nss_dns/dns-host.c glibc-2.19/resolv/nss_dns/dns-host.c
--- glibc-2.19.orig/resolv/nss_dns/dns-host.c 2016-02-19 15:40:23.394686772 +0300
+++ glibc-2.19/resolv/nss_dns/dns-host.c 2016-02-19 15:40:23.397686773 +0300
@@ -1049,7 +1049,10 @@
int h_namelen = 0;
if (ancount == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
while (ancount-- > 0 && cp < end_of_message && had_error == 0)
{
@@ -1226,7 +1229,14 @@
/* Special case here: if the resolver sent a result but it only
contains a CNAME while we are looking for a T_A or T_AAAA record,
we fail with NOTFOUND instead of TRYAGAIN. */
- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
+ if (canon != NULL)
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
+
+ *h_errnop = NETDB_INTERNAL;
+ return NSS_STATUS_TRYAGAIN;
}
@@ -1240,11 +1250,101 @@
enum nss_status status = NSS_STATUS_NOTFOUND;
+ /* Combining the NSS status of two distinct queries requires some
+ compromise and attention to symmetry (A or AAAA queries can be
+ returned in any order). What follows is a breakdown of how this
+ code is expected to work and why. We discuss only SUCCESS,
+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
+ that apply (though RETURN and MERGE exist). We make a distinction
+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
+ A recoverable TRYAGAIN is almost always due to buffer size issues
+ and returns ERANGE in errno and the caller is expected to retry
+ with a larger buffer.
+
+ Lastly, you may be tempted to make significant changes to the
+ conditions in this code to bring about symmetry between responses.
+ Please don't change anything without due consideration for
+ expected application behaviour. Some of the synthesized responses
+ aren't very well thought out and sometimes appear to imply that
+ IPv4 responses are always answer 1, and IPv6 responses are always
+ answer 2, but that's not true (see the implemetnation of send_dg
+ and send_vc to see response can arrive in any order, particlarly
+ for UDP). However, we expect it holds roughly enough of the time
+ that this code works, but certainly needs to be fixed to make this
+ a more robust implementation.
+
+ ----------------------------------------------
+ | Answer 1 Status / | Synthesized | Reason |
+ | Answer 2 Status | Status | |
+ |--------------------------------------------|
+ | SUCCESS/SUCCESS | SUCCESS | [1] |
+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] |
+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] |
+ | SUCCESS/NOTFOUND | SUCCESS | [1] |
+ | SUCCESS/UNAVAIL | SUCCESS | [1] |
+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] |
+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] |
+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] |
+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] |
+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] |
+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] |
+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] |
+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] |
+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] |
+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] |
+ | NOTFOUND/SUCCESS | SUCCESS | [3] |
+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] |
+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] |
+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] |
+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] |
+ | UNAVAIL/SUCCESS | UNAVAIL | [4] |
+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] |
+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] |
+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] |
+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] |
+ ----------------------------------------------
+
+ [1] If the first response is a success we return success.
+ This ignores the state of the second answer and in fact
+ incorrectly sets errno and h_errno to that of the second
+ answer. However because the response is a success we ignore
+ *errnop and *h_errnop (though that means you touched errno on
+ success). We are being conservative here and returning the
+ likely IPv4 response in the first answer as a success.
+
+ [2] If the first response is a recoverable TRYAGAIN we return
+ that instead of looking at the second response. The
+ expectation here is that we have failed to get an IPv4 response
+ and should retry both queries.
+
+ [3] If the first response was not a SUCCESS and the second
+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
+ result from the second response, otherwise the first responses
+ status is used. Again we have some odd side-effects when the
+ second response is NOTFOUND because we overwrite *errnop and
+ *h_errnop that means that a first answer of NOTFOUND might see
+ its *errnop and *h_errnop values altered. Whether it matters
+ in practice that a first response NOTFOUND has the wrong
+ *errnop and *h_errnop is undecided.
+
+ [4] If the first response is UNAVAIL we return that instead of
+ looking at the second response. The expectation here is that
+ it will have failed similarly e.g. configuration failure.
+
+ [5] Testing this code is complicated by the fact that truncated
+ second response buffers might be returned as SUCCESS if the
+ first answer is a SUCCESS. To fix this we add symmetry to
+ TRYAGAIN with the second response. If the second response
+ is a recoverable error we now return TRYAGIN even if the first
+ response was SUCCESS. */
+
if (anslen1 > 0)
status = gaih_getanswer_slice(answer1, anslen1, qname,
&pat, &buffer, &buflen,
errnop, h_errnop, ttlp,
&first);
+
if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
|| (status == NSS_STATUS_TRYAGAIN
/* We want to look at the second answer in case of an
@@ -1260,8 +1360,15 @@
&pat, &buffer, &buflen,
errnop, h_errnop, ttlp,
&first);
+ /* Use the second response status in some cases. */
if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
status = status2;
+ /* Do not return a truncated second response (unless it was
+ unavoidable e.g. unrecoverable TRYAGAIN). */
+ if (status == NSS_STATUS_SUCCESS
+ && (status2 == NSS_STATUS_TRYAGAIN
+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
+ status = NSS_STATUS_TRYAGAIN;
}
return status;
diff -Naur glibc-2.19.orig/resolv/res_query.c glibc-2.19/resolv/res_query.c
--- glibc-2.19.orig/resolv/res_query.c 2016-02-19 15:40:23.394686772 +0300
+++ glibc-2.19/resolv/res_query.c 2016-02-19 15:41:27.700691113 +0300
@@ -391,6 +391,7 @@
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
}
}
@@ -431,6 +432,7 @@
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
}
/*
@@ -502,6 +504,7 @@
{
free (*answerp2);
*answerp2 = NULL;
+ *nanswerp2 = 0;
}
if (saved_herrno != -1)
RES_SET_H_ERRNO(statp, saved_herrno);
diff -Naur glibc-2.19.orig/resolv/res_send.c glibc-2.19/resolv/res_send.c
--- glibc-2.19.orig/resolv/res_send.c 2016-02-19 15:40:23.394686772 +0300
+++ glibc-2.19/resolv/res_send.c 2016-02-19 15:46:00.356709515 +0300
@@ -1,3 +1,20 @@
+/* Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
/*
* Copyright (c) 1985, 1989, 1993
* The Regents of the University of California. All rights reserved.
@@ -360,6 +377,8 @@
#ifdef USE_HOOKS
if (__builtin_expect (statp->qhook || statp->rhook, 0)) {
if (anssiz < MAXPACKET && ansp) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *buf = malloc (MAXPACKET);
if (buf == NULL)
return (-1);
@@ -652,6 +671,77 @@
/* Private */
+/* The send_vc function is responsible for sending a DNS query over TCP
+ to the nameserver numbered NS from the res_state STATP i.e.
+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and
+ IPv6 queries at the same serially on the same socket.
+
+ Please note that for TCP there is no way to disable sending both
+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
+ and sends the queries serially and waits for the result after each
+ sent query. This implemetnation should be corrected to honour these
+ options.
+
+ Please also note that for TCP we send both queries over the same
+ socket one after another. This technically violates best practice
+ since the server is allowed to read the first query, respond, and
+ then close the socket (to service another client). If the server
+ does this, then the remaining second query in the socket data buffer
+ will cause the server to send the client an RST which will arrive
+ asynchronously and the client's OS will likely tear down the socket
+ receive buffer resulting in a potentially short read and lost
+ response data. This will force the client to retry the query again,
+ and this process may repeat until all servers and connection resets
+ are exhausted and then the query will fail. It's not known if this
+ happens with any frequency in real DNS server implementations. This
+ implementation should be corrected to use two sockets by default for
+ parallel queries.
+
+ The query stored in BUF of BUFLEN length is sent first followed by
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
+ serially on the same socket.
+
+ Answers to the query are stored firstly in *ANSP up to a max of
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
+ then malloc is used to allocate a new response buffer and ANSCP and
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
+ are needed but ANSCP is NULL, then as much of the response as
+ possible is read into the buffer, but the results will be truncated.
+ When truncation happens because of a small answer buffer the DNS
+ packets header feild TC will bet set to 1, indicating a truncated
+ message and the rest of the socket data will be read and discarded.
+
+ Answers to the query are stored secondly in *ANSP2 up to a max of
+ *ANSSIZP2 bytes, with the actual response length stored in
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
+ is non-NULL (required for a second query) then malloc is used to
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
+ size and *ANSP2_MALLOCED is set to 1.
+
+ The ANSP2_MALLOCED argument will eventually be removed as the
+ change in buffer pointer can be used to detect the buffer has
+ changed and that the caller should use free on the new buffer.
+
+ Note that the answers may arrive in any order from the server and
+ therefore the first and second answer buffers may not correspond to
+ the first and second queries.
+
+ It is not supported to call this function with a non-NULL ANSP2
+ but a NULL ANSCP. Put another way, you can call send_vc with a
+ single unmodifiable buffer or two modifiable buffers, but no other
+ combination is supported.
+
+ It is the caller's responsibility to free the malloc allocated
+ buffers by detecting that the pointers have changed from their
+ original values i.e. *ANSCP or *ANSP2 has changed.
+
+ If errors are encountered then *TERRNO is set to an appropriate
+ errno value and a zero result is returned for a recoverable error,
+ and a less-than zero result is returned for a non-recoverable error.
+
+ If no errors are encountered then *TERRNO is left unmodified and
+ a the length of the first response in bytes is returned. */
static int
send_vc(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -661,11 +751,7 @@
{
const HEADER *hp = (HEADER *) buf;
const HEADER *hp2 = (HEADER *) buf2;
- u_char *ans = *ansp;
- int orig_anssizp = *anssizp;
- // XXX REMOVE
- // int anssiz = *anssizp;
- HEADER *anhp = (HEADER *) ans;
+ HEADER *anhp = (HEADER *) *ansp;
struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
int truncating, connreset, resplen, n;
struct iovec iov[4];
@@ -741,6 +827,8 @@
* Receive length & response
*/
int recvresp1 = 0;
+ /* Skip the second response if there is no second query.
+ To do that we mark the second response as received. */
int recvresp2 = buf2 == NULL;
uint16_t rlen16;
read_len:
@@ -777,33 +865,14 @@
u_char **thisansp;
int *thisresplenp;
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
+ /* We have not received any responses
+ yet or we only have one response to
+ receive. */
thisanssizp = anssizp;
thisansp = anscp ?: ansp;
assert (anscp != NULL || ansp2 == NULL);
thisresplenp = &resplen;
} else {
- if (*anssizp != MAXPACKET) {
- /* No buffer allocated for the first
- reply. We can try to use the rest
- of the user-provided buffer. */
-#ifdef _STRING_ARCH_unaligned
- *anssizp2 = orig_anssizp - resplen;
- *ansp2 = *ansp + resplen;
-#else
- int aligned_resplen
- = ((resplen + __alignof__ (HEADER) - 1)
- & ~(__alignof__ (HEADER) - 1));
- *anssizp2 = orig_anssizp - aligned_resplen;
- *ansp2 = *ansp + aligned_resplen;
-#endif
- } else {
- /* The first reply did not fit into the
- user-provided buffer. Maybe the second
- answer will. */
- *anssizp2 = orig_anssizp;
- *ansp2 = *ansp;
- }
-
thisanssizp = anssizp2;
thisansp = ansp2;
thisresplenp = resplen2;
@@ -811,10 +880,14 @@
anhp = (HEADER *) *thisansp;
*thisresplenp = rlen;
- if (rlen > *thisanssizp) {
- /* Yes, we test ANSCP here. If we have two buffers
- both will be allocatable. */
- if (__builtin_expect (anscp != NULL, 1)) {
+ /* Is the answer buffer too small? */
+ if (*thisanssizp < rlen) {
+ /* If the current buffer is non-NULL and it's not
+ pointing at the static user-supplied buffer then
+ we can reallocate it. */
+ if (thisansp != NULL && thisansp != ansp) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *newp = malloc (MAXPACKET);
if (newp == NULL) {
*terrno = ENOMEM;
@@ -824,6 +897,9 @@
*thisanssizp = MAXPACKET;
*thisansp = newp;
anhp = (HEADER *) newp;
+ /* A uint16_t can't be larger than MAXPACKET
+ thus it's safe to allocate MAXPACKET but
+ read RLEN bytes instead. */
len = rlen;
} else {
Dprint(statp->options & RES_DEBUG,
@@ -987,6 +1063,66 @@
return 1;
}
+/* The send_dg function is responsible for sending a DNS query over UDP
+ to the nameserver numbered NS from the res_state STATP i.e.
+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries
+ along with the ability to send the query in parallel for both stacks
+ (default) or serially (RES_SINGLKUP). It also supports serial lookup
+ with a close and reopen of the socket used to talk to the server
+ (RES_SNGLKUPREOP) to work around broken name servers.
+
+ The query stored in BUF of BUFLEN length is sent first followed by
+ the query stored in BUF2 of BUFLEN2 length. Queries are sent
+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
+
+ Answers to the query are stored firstly in *ANSP up to a max of
+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP
+ is non-NULL (to indicate that modifying the answer buffer is allowed)
+ then malloc is used to allocate a new response buffer and ANSCP and
+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes
+ are needed but ANSCP is NULL, then as much of the response as
+ possible is read into the buffer, but the results will be truncated.
+ When truncation happens because of a small answer buffer the DNS
+ packets header feild TC will bet set to 1, indicating a truncated
+ message, while the rest of the UDP packet is discarded.
+
+ Answers to the query are stored secondly in *ANSP2 up to a max of
+ *ANSSIZP2 bytes, with the actual response length stored in
+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2
+ is non-NULL (required for a second query) then malloc is used to
+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer
+ size and *ANSP2_MALLOCED is set to 1.
+
+ The ANSP2_MALLOCED argument will eventually be removed as the
+ change in buffer pointer can be used to detect the buffer has
+ changed and that the caller should use free on the new buffer.
+
+ Note that the answers may arrive in any order from the server and
+ therefore the first and second answer buffers may not correspond to
+ the first and second queries.
+
+ It is not supported to call this function with a non-NULL ANSP2
+ but a NULL ANSCP. Put another way, you can call send_vc with a
+ single unmodifiable buffer or two modifiable buffers, but no other
+ combination is supported.
+
+ It is the caller's responsibility to free the malloc allocated
+ buffers by detecting that the pointers have changed from their
+ original values i.e. *ANSCP or *ANSP2 has changed.
+
+ If an answer is truncated because of UDP datagram DNS limits then
+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1
+ if any progress was made reading a response from the nameserver and
+ is used by the caller to distinguish between ECONNREFUSED and
+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
+
+ If errors are encountered then *TERRNO is set to an appropriate
+ errno value and a zero result is returned for a recoverable error,
+ and a less-than zero result is returned for a non-recoverable error.
+
+ If no errors are encountered then *TERRNO is left unmodified and
+ a the length of the first response in bytes is returned. */
static int
send_dg(res_state statp,
const u_char *buf, int buflen, const u_char *buf2, int buflen2,
@@ -996,8 +1132,6 @@
{
const HEADER *hp = (HEADER *) buf;
const HEADER *hp2 = (HEADER *) buf2;
- u_char *ans = *ansp;
- int orig_anssizp = *anssizp;
struct timespec now, timeout, finish;
struct pollfd pfd[1];
int ptimeout;
@@ -1030,6 +1164,8 @@
int need_recompute = 0;
int nwritten = 0;
int recvresp1 = 0;
+ /* Skip the second response if there is no second query.
+ To do that we mark the second response as received. */
int recvresp2 = buf2 == NULL;
pfd[0].fd = EXT(statp).nssocks[ns];
pfd[0].events = POLLOUT;
@@ -1193,53 +1329,54 @@
int *thisresplenp;
if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
+ /* We have not received any responses
+ yet or we only have one response to
+ receive. */
thisanssizp = anssizp;
thisansp = anscp ?: ansp;
assert (anscp != NULL || ansp2 == NULL);
thisresplenp = &resplen;
} else {
- if (*anssizp != MAXPACKET) {
- /* No buffer allocated for the first
- reply. We can try to use the rest
- of the user-provided buffer. */
-#ifdef _STRING_ARCH_unaligned
- *anssizp2 = orig_anssizp - resplen;
- *ansp2 = *ansp + resplen;
-#else
- int aligned_resplen
- = ((resplen + __alignof__ (HEADER) - 1)
- & ~(__alignof__ (HEADER) - 1));
- *anssizp2 = orig_anssizp - aligned_resplen;
- *ansp2 = *ansp + aligned_resplen;
-#endif
- } else {
- /* The first reply did not fit into the
- user-provided buffer. Maybe the second
- answer will. */
- *anssizp2 = orig_anssizp;
- *ansp2 = *ansp;
- }
-
thisanssizp = anssizp2;
thisansp = ansp2;
thisresplenp = resplen2;
}
if (*thisanssizp < MAXPACKET
- /* Yes, we test ANSCP here. If we have two buffers
- both will be allocatable. */
- && anscp
+ /* If the current buffer is non-NULL and it's not
+ pointing at the static user-supplied buffer then
+ we can reallocate it. */
+ && (thisansp != NULL && thisansp != ansp)
+ /* Is the size too small? */
#ifdef FIONREAD
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|| *thisanssizp < *thisresplenp)
#endif
) {
+ /* Always allocate MAXPACKET, callers expect
+ this specific size. */
u_char *newp = malloc (MAXPACKET);
if (newp != NULL) {
- *anssizp = MAXPACKET;
- *thisansp = ans = newp;
+ *thisanssizp = MAXPACKET;
+ *thisansp = newp;
}
}
+ /* We could end up with truncation if anscp was NULL
+ (not allowed to change caller's buffer) and the
+ response buffer size is too small. This isn't a
+ reliable way to detect truncation because the ioctl
+ may be an inaccurate report of the UDP message size.
+ Therefore we use this only to issue debug output.
+ To do truncation accurately with UDP we need
+ MSG_TRUNC which is only available on Linux. We
+ can abstract out the Linux-specific feature in the
+ future to detect truncation. */
+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) {
+ Dprint(statp->options & RES_DEBUG,
+ (stdout, ";; response may be truncated (UDP)\n")
+ );
+ }
+
HEADER *anhp = (HEADER *) *thisansp;
socklen_t fromlen = sizeof(struct sockaddr_in6);
assert (sizeof(from) <= fromlen);

View file

@ -1,11 +1,22 @@
diff -rup a/elf/dl-load.c b/elf/dl-load.c Index: glibc-2.22-386-g95e8397/elf/dl-load.c
--- a/elf/dl-load.c 2012-02-03 10:59:58.917870716 -0700 ===================================================================
+++ b/elf/dl-load.c 2012-02-03 11:01:01.796580644 -0700 --- glibc-2.22-386-g95e8397.orig/elf/dl-load.c
@@ -1130,6 +1130,16 @@ _dl_map_object_from_fd (const char *name +++ glibc-2.22-386-g95e8397/elf/dl-load.c
@@ -881,7 +881,8 @@ _dl_map_object_from_fd (const char *name
/* Get file information. */
struct r_file_id id;
- if (__glibc_unlikely (!_dl_get_file_id (fd, &id)))
+ struct stat64 st;
+ if (__glibc_unlikely (!_dl_get_file_id (fd, &id, &st)))
{
errstring = N_("cannot stat shared object");
call_lose_errno:
@@ -1076,6 +1077,16 @@ _dl_map_object_from_fd (const char *name
= N_("ELF load command address/offset not properly aligned"); = N_("ELF load command address/offset not properly aligned");
goto call_lose; goto call_lose;
} }
+ if (__builtin_expect ((ph->p_offset + ph->p_filesz > st.st_size), 0)) + if (__glibc_unlikely (ph->p_offset + ph->p_filesz > st.st_size))
+ { + {
+ /* If the segment requires zeroing of part of its last + /* If the segment requires zeroing of part of its last
+ page, we'll crash when accessing the unmapped page. + page, we'll crash when accessing the unmapped page.
@ -16,6 +27,47 @@ diff -rup a/elf/dl-load.c b/elf/dl-load.c
+ goto call_lose; + goto call_lose;
+ } + }
c = &loadcmds[nloadcmds++]; struct loadcmd *c = &loadcmds[nloadcmds++];
c->mapstart = ph->p_vaddr & ~(GLRO(dl_pagesize) - 1); c->mapstart = ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
Only in b/elf: dl-load.c.orig Index: glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
===================================================================
--- glibc-2.22-386-g95e8397.orig/sysdeps/generic/dl-fileid.h
+++ glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
@@ -29,7 +29,8 @@ struct r_file_id
On error, returns false, with errno set. */
static inline bool
_dl_get_file_id (int fd __attribute__ ((unused)),
- struct r_file_id *id __attribute__ ((unused)))
+ struct r_file_id *id __attribute__ ((unused)),
+ struct stat64_t *st __attribute__((unused)))
{
return true;
}
Index: glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
===================================================================
--- glibc-2.22-386-g95e8397.orig/sysdeps/posix/dl-fileid.h
+++ glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
@@ -27,18 +27,16 @@ struct r_file_id
ino64_t ino;
};
-/* Sample FD to fill in *ID. Returns true on success.
+/* Sample FD to fill in *ID and *ST. Returns true on success.
On error, returns false, with errno set. */
static inline bool
-_dl_get_file_id (int fd, struct r_file_id *id)
+_dl_get_file_id (int fd, struct r_file_id *id, struct stat64 *st)
{
- struct stat64 st;
-
- if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, &st) < 0))
+ if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, st) < 0))
return false;
- id->dev = st.st_dev;
- id->ino = st.st_ino;
+ id->dev = st->st_dev;
+ id->ino = st->st_ino;
return true;
}

View file

@ -1,78 +0,0 @@
2012-03-07 Jeff Law <law@redhat.com>
* elf/dl-reloc.c (_dl_relocate_object): Move code to allocate
l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE.
diff -rup a/elf/dl-reloc.c b/elf/dl-reloc.c
--- a/elf/dl-reloc.c 2012-01-01 05:16:32.000000000 -0700
+++ b/elf/dl-reloc.c 2012-03-06 15:41:56.486242640 -0700
@@ -238,32 +238,9 @@ _dl_relocate_object (struct link_map *l,
/* String table object symbols. */
const char *strtab = (const void *) D_PTR (l, l_info[DT_STRTAB]);
- /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
-#define RESOLVE_MAP(ref, version, r_type) \
- (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
- ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
- && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
- ? (bump_num_cache_relocations (), \
- (*ref) = l->l_lookup_cache.ret, \
- l->l_lookup_cache.value) \
- : ({ lookup_t _lr; \
- int _tc = elf_machine_type_class (r_type); \
- l->l_lookup_cache.type_class = _tc; \
- l->l_lookup_cache.sym = (*ref); \
- const struct r_found_version *v = NULL; \
- if ((version) != NULL && (version)->hash != 0) \
- v = (version); \
- _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
- scope, v, _tc, \
- DL_LOOKUP_ADD_DEPENDENCY, NULL); \
- l->l_lookup_cache.ret = (*ref); \
- l->l_lookup_cache.value = _lr; })) \
- : l)
-
-#include "dynamic-link.h"
-
- ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
-
+ /* ELF_DYNAMIC_RELOCATE may need to examine l_reloc_result
+ when handling MACHINE_IRELATIVE relocs. So we must
+ allocate l_reloc_result prior to calling ELF_DYNAMIC_RELOCATE. */
#ifndef PROF
if (__builtin_expect (consider_profiling, 0))
{
@@ -290,6 +267,32 @@ _dl_relocate_object (struct link_map *l,
}
}
#endif
+
+ /* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
+#define RESOLVE_MAP(ref, version, r_type) \
+ (ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
+ ? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
+ && elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
+ ? (bump_num_cache_relocations (), \
+ (*ref) = l->l_lookup_cache.ret, \
+ l->l_lookup_cache.value) \
+ : ({ lookup_t _lr; \
+ int _tc = elf_machine_type_class (r_type); \
+ l->l_lookup_cache.type_class = _tc; \
+ l->l_lookup_cache.sym = (*ref); \
+ const struct r_found_version *v = NULL; \
+ if ((version) != NULL && (version)->hash != 0) \
+ v = (version); \
+ _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
+ scope, v, _tc, \
+ DL_LOOKUP_ADD_DEPENDENCY, NULL); \
+ l->l_lookup_cache.ret = (*ref); \
+ l->l_lookup_cache.value = _lr; })) \
+ : l)
+
+#include "dynamic-link.h"
+
+ ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling, skip_ifunc);
}
/* Mark the object so we know this work has been done. */

View file

@ -12,7 +12,7 @@ diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags) @@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
alloca_used); alloca_used);
n = mbsrtowcs (wpattern, &p, n + 1, &ps); n = mbsrtowcs (wpattern, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0)) if (__glibc_unlikely (n == (size_t) -1))
- /* Something wrong. - /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't - XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */ - already done? */
@ -25,20 +25,20 @@ diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags) @@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
prepare_wpattern: prepare_wpattern:
n = mbsrtowcs (NULL, &pattern, 0, &ps); n = mbsrtowcs (NULL, &pattern, 0, &ps);
if (__builtin_expect (n == (size_t) -1, 0)) if (__glibc_unlikely (n == (size_t) -1))
- /* Something wrong. - /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't - XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */ - already done? */
- return -1; - return -1;
+ /*Something wrong: Fall back to single byte matching. */ + /*Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte; + goto try_singlebyte;
if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0)) if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
{ {
__set_errno (ENOMEM); __set_errno (ENOMEM);
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags) @@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
alloca_used); alloca_used);
n = mbsrtowcs (wstring, &p, n + 1, &ps); n = mbsrtowcs (wstring, &p, n + 1, &ps);
if (__builtin_expect (n == (size_t) -1, 0)) if (__glibc_unlikely (n == (size_t) -1))
- { - {
- /* Something wrong. - /* Something wrong.
- XXX Do we have to set `errno' to something which - XXX Do we have to set `errno' to something which
@ -55,14 +55,14 @@ diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags) @@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
prepare_wstring: prepare_wstring:
n = mbsrtowcs (NULL, &string, 0, &ps); n = mbsrtowcs (NULL, &string, 0, &ps);
if (__builtin_expect (n == (size_t) -1, 0)) if (__glibc_unlikely (n == (size_t) -1))
- /* Something wrong. - /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't - XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */ - already done? */
- goto free_return; - goto free_return;
+ /* Something wrong: Fall back to singlebyte matching. */ + /* Something wrong: Fall back to singlebyte matching. */
+ goto free_and_try_singlebyte; + goto free_and_try_singlebyte;
if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0)) if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
{ {
free (wpattern_malloc); free (wpattern_malloc);
@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags) @@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)

File diff suppressed because it is too large Load diff

View file

@ -1,61 +0,0 @@
#
# Red Hat BZ:
# https://bugzilla.redhat.com/show_bug.cgi?id=911307
#
# Sourceware BZ: None.
#
# Upstreamm submission: Not yet completed.
#
# ChangeLog
#
# 2013-02-27 Carlos O'Donell <carlos@redhat.com>
#
# * elf/Makefile (CFLAGS-.o): Add -fno-tree-loop-distribute-patterns.
# (CFLAGS-.os): Likewise.
# (CFLAGS-.op): Likewise.
# (CFLAGS-.ob): Likewise.
# (CFLAGS-.oS): Likewise.
# * string/Makefile (CFLAGS-.o): Likewise.
# (CFLAGS-.os): Likewise.
# (CFLAGS-.op): Likewise.
# (CFLAGS-.ob): Likewise.
# (CFLAGS-.oS): Likewise.
#
diff -urN glibc-2.17-c758a686/string/Makefile tmp/glibc-2.17-c758a686/string/Makefile
--- glibc-2.17-c758a686/string/Makefile 2013-02-27 18:07:34.618968703 -0500
+++ tmp/glibc-2.17-c758a686/string/Makefile 2013-02-27 18:08:16.075796160 -0500
@@ -72,6 +72,14 @@ CFLAGS-stratcliff.c = -fno-builtin
CFLAGS-test-ffs.c = -fno-builtin
CFLAGS-tst-inlcall.c = -fno-builtin
+# Disable any optimization which might result in function calls to the very
+# same functions we are trying to compile, thus creating an infinite loop.
+CFLAGS-.o += -fno-tree-loop-distribute-patterns
+CFLAGS-.os += -fno-tree-loop-distribute-patterns
+CFLAGS-.op += -fno-tree-loop-distribute-patterns
+CFLAGS-.ob += -fno-tree-loop-distribute-patterns
+CFLAGS-.oS += -fno-tree-loop-distribute-patterns
+
ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-svc.out
$(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc
diff -urN glibc-2.17-c758a686/elf/Makefile tmp/glibc-2.17-c758a686/elf/Makefile
--- glibc-2.17-c758a686/elf/Makefile 2013-02-27 18:07:13.812055613 -0500
+++ tmp/glibc-2.17-c758a686/elf/Makefile 2013-02-27 18:08:16.075796160 -0500
@@ -432,6 +432,16 @@
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
+# Disable any optimization which might result in function calls during early
+# dynamic loader startup. We disable -ftree-loop-distribute-patterns which
+# might convert code into calls to functions like memcpy or memset when the PLT
+# is not yet setup.
+CFLAGS-.o += -fno-tree-loop-distribute-patterns
+CFLAGS-.os += -fno-tree-loop-distribute-patterns
+CFLAGS-.op += -fno-tree-loop-distribute-patterns
+CFLAGS-.ob += -fno-tree-loop-distribute-patterns
+CFLAGS-.oS += -fno-tree-loop-distribute-patterns
+
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))

View file

@ -1,7 +1,7 @@
%define checklist %{_builddir}/%{name}-%{version}/Check.list %define checklist %{_builddir}/%{name}-%{version}/Check.list
# crypt blowfish support # crypt blowfish support
%define crypt_bf_ver 1.2 %define crypt_bf_ver 1.3
%define _slibdir /%{_lib} %define _slibdir /%{_lib}
%define _slibdir32 /lib %define _slibdir32 /lib
@ -56,8 +56,8 @@
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Epoch: 6 Epoch: 6
Version: 2.19 Version: 2.24
Release: 22 Release: 1
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Group: System/Libraries Group: System/Libraries
Url: http://www.eglibc.org/ Url: http://www.eglibc.org/
@ -109,27 +109,20 @@ Patch5: glibc-arm-hardfloat-3.patch
# Needs to be sent upstream # Needs to be sent upstream
Patch6: glibc-rh697421.patch Patch6: glibc-rh697421.patch
# Needs to be sent upstream
Patch10: glibc-rh841318.patch
# All these were from the glibc-fedora.patch mega-patch and need another # All these were from the glibc-fedora.patch mega-patch and need another
# round of reviewing. Ideally they'll either be submitted upstream or # round of reviewing. Ideally they'll either be submitted upstream or
# dropped. # dropped.
Patch11: glibc-fedora-uname-getrlimit.patch
Patch12: glibc-fedora-__libc_multiple_libcs.patch Patch12: glibc-fedora-__libc_multiple_libcs.patch
Patch14: glibc-fedora-elf-ORIGIN.patch Patch14: glibc-fedora-elf-ORIGIN.patch
Patch15: glibc-fedora-elf-init-hidden_undef.patch Patch15: glibc-fedora-elf-init-hidden_undef.patch
Patch16: glibc-fedora-elf-rh737223.patch Patch16: glibc-fedora-elf-rh737223.patch
Patch18: eglibc-fedora-test-debug-gnuc-hack.patch Patch18: eglibc-fedora-test-debug-gnuc-hack.patch
Patch20: glibc-fedora-getrlimit-PLT.patch
Patch21: glibc-fedora-i386-tls-direct-seg-refs.patch Patch21: glibc-fedora-i386-tls-direct-seg-refs.patch
Patch22: eglibc-fedora-pt_chown.patch
Patch23: glibc-fedora-include-bits-ldbl.patch Patch23: glibc-fedora-include-bits-ldbl.patch
Patch24: glibc-fedora-ldd.patch Patch24: glibc-fedora-ldd.patch
Patch25: glibc-fedora-linux-tcsetattr.patch Patch25: glibc-fedora-linux-tcsetattr.patch
Patch26: eglibc-fedora-locale-euro.patch Patch26: eglibc-fedora-locale-euro.patch
Patch27: eglibc-fedora-localedata-locales-fixes.patch
# We disagree with # We disagree with
# glibc-fedora-streams-rh436349.patch # glibc-fedora-streams-rh436349.patch
# Therefore we don't package/apply it. # Therefore we don't package/apply it.
@ -139,8 +132,6 @@ Patch31: glibc-fedora-locarchive.patch
Patch32: glibc-fedora-manual-dircategory.patch Patch32: glibc-fedora-manual-dircategory.patch
Patch33: glibc-fedora-nis-rh188246.patch Patch33: glibc-fedora-nis-rh188246.patch
Patch34: glibc-fedora-nptl-linklibc.patch Patch34: glibc-fedora-nptl-linklibc.patch
Patch35: glibc-fedora-ppc-unwind.patch
Patch37: eglibc-fedora-strict-aliasing.patch
# #
# Patches from upstream # Patches from upstream
@ -154,20 +145,12 @@ Patch37: eglibc-fedora-strict-aliasing.patch
Patch38: glibc-rh757881.patch Patch38: glibc-rh757881.patch
Patch40: glibc-rh741105.patch Patch40: glibc-rh741105.patch
# Upstream BZ 13818
Patch49: glibc-rh800224.patch
# Upstream BZ 14247 # Upstream BZ 14247
Patch50: glibc-rh827510.patch Patch50: glibc-rh827510.patch
# Upstream BZ 14185 # Upstream BZ 14185
Patch54: glibc-rh819430.patch Patch54: glibc-rh819430.patch
Patch55: glibc-rh911307.patch
Patch51: glibc-rh952799.patch Patch51: glibc-rh952799.patch
Patch501: glibc-rh1170118-CVE-2014-7817.patch
Patch502: glibc-rh1194143.patch
Patch503: glibc-rh1199525.patch
Patch504: glibc-rh1296031.patch
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# mandriva patches # mandriva patches
Patch56: eglibc-mandriva-localedef-archive-follow-symlinks.patch Patch56: eglibc-mandriva-localedef-archive-follow-symlinks.patch
@ -186,7 +169,6 @@ Patch67: eglibc-mandriva-biarch-cpp-defines.patch
Patch68: eglibc-mandriva-ENOTTY-fr-translation.patch Patch68: eglibc-mandriva-ENOTTY-fr-translation.patch
Patch69: eglibc-mandriva-biarch-utils.patch Patch69: eglibc-mandriva-biarch-utils.patch
Patch70: eglibc-mandriva-multiarch.patch Patch70: eglibc-mandriva-multiarch.patch
Patch71: eglibc-mandriva-i586-hptiming.patch
Patch72: eglibc-mandriva-i586-if-no-cmov.patch Patch72: eglibc-mandriva-i586-if-no-cmov.patch
Patch73: eglibc-mandriva-pt_BR-i18nfixes.patch Patch73: eglibc-mandriva-pt_BR-i18nfixes.patch
Patch74: eglibc-mandriva-testsuite-ldbl-bits.patch Patch74: eglibc-mandriva-testsuite-ldbl-bits.patch
@ -197,7 +179,6 @@ Patch75: eglibc-mandriva-testsuite-rt-notparallel.patch
# https://bugzilla.redhat.com/attachment.cgi?id=491198 # https://bugzilla.redhat.com/attachment.cgi?id=491198
Patch77: eglibc-mandriva-fix-for-new-memcpy-behavior.patch Patch77: eglibc-mandriva-fix-for-new-memcpy-behavior.patch
Patch79: eglibc-mandriva-no-leaf-attribute.patch Patch79: eglibc-mandriva-no-leaf-attribute.patch
Patch80: eglibc-mandriva-string-format-fixes.patch
Patch81: eglibc-mandriva-mdv-avx-owl-crypt.patch Patch81: eglibc-mandriva-mdv-avx-owl-crypt.patch
Patch82: eglibc-mandriva-mdv-owl-crypt_freesec.patch Patch82: eglibc-mandriva-mdv-owl-crypt_freesec.patch
Patch83: eglibc-mandriva-avx-relocate_fcrypt.patch Patch83: eglibc-mandriva-avx-relocate_fcrypt.patch
@ -205,7 +186,6 @@ Patch84: eglibc-mandriva-avx-increase_BF_FRAME.patch
Patch85: eglibc-mandriva-mdv-wrapper_handle_sha.patch Patch85: eglibc-mandriva-mdv-wrapper_handle_sha.patch
# Reverts a part of eglibc-fedora-uname-getrlimit.patch that breaks the build # Reverts a part of eglibc-fedora-uname-getrlimit.patch that breaks the build
Patch86: nptl-getrlimit-compile.patch Patch86: nptl-getrlimit-compile.patch
Patch87: eglibc-2.17-bo-locale-buildfix.patch
# http://sourceware.org/bugzilla/show_bug.cgi?id=14995 # http://sourceware.org/bugzilla/show_bug.cgi?id=14995
# http://sourceware.org/bugzilla/attachment.cgi?id=6795 # http://sourceware.org/bugzilla/attachment.cgi?id=6795
Patch88: glibc-2.17-gold.patch Patch88: glibc-2.17-gold.patch
@ -807,34 +787,25 @@ their ~/.profile configuration file.
%patch04 -p1 %patch04 -p1
%patch05 -p1 %patch05 -p1
%patch06 -p1 %patch06 -p1
%patch10 -p1 -b .rh841318~
%patch11 -p1
%patch12 -p1 -b .multiple~ %patch12 -p1 -b .multiple~
%patch14 -p1 -b .elfORIGIN~ %patch14 -p1 -b .elfORIGIN~
%patch15 -p1 %patch15 -p1
%patch16 -p1 -b .rh737223~ %patch16 -p1 -b .rh737223~
%patch18 -p1 %patch18 -p1
%patch20 -p1
%patch21 -p1 %patch21 -p1
%patch22 -p1
%patch23 -p1 %patch23 -p1
%patch24 -p1 %patch24 -p1
%patch25 -p1 %patch25 -p1
%patch26 -p1 -b .curr~ %patch26 -p1 -b .curr~
%patch27 -p1
%patch29 -p1 -b .locales~ %patch29 -p1 -b .locales~
%patch30 -p1 %patch30 -p1
%patch31 -p1 %patch31 -p1
%patch32 -p1 %patch32 -p1
%patch33 -p1 %patch33 -p1
%patch34 -p1 %patch34 -p1
%patch35 -p1
%patch37 -p1 -b .aliasing~
%patch40 -p1 %patch40 -p1
%patch49 -p1 -b .rh800224~
%patch50 -p1 %patch50 -p1
%patch54 -p1 %patch54 -p1
%patch55 -p1
%patch51 -p1 %patch51 -p1
%patch56 -p1 %patch56 -p1
%patch57 -p1 %patch57 -p1
@ -850,19 +821,11 @@ their ~/.profile configuration file.
%patch68 -p1 %patch68 -p1
%patch69 -p1 %patch69 -p1
%patch70 -p1 -b .multiarch~ %patch70 -p1 -b .multiarch~
%patch71 -p1 -b .hpt~
%patch72 -p1 %patch72 -p1
%patch73 -p1 %patch73 -p1
%patch74 -p1 -b .ldbl~ %patch74 -p1 -b .ldbl~
%patch75 -p1 -b .tsp~ %patch75 -p1 -b .tsp~
%patch79 -p1 %patch79 -p1
%patch80 -p1
%patch501 -p1
%patch502 -p1
%patch503 -p1
%patch504 -p1
# copy freesec source # copy freesec source
cp %{SOURCE52} %{SOURCE53} crypt/ cp %{SOURCE52} %{SOURCE53} crypt/
@ -881,8 +844,6 @@ cp -a crypt_blowfish-%{crypt_bf_ver}/*.[chS] crypt/
%patch86 -p1 -b .compile~ %patch86 -p1 -b .compile~
%patch87 -p1 -b .boLocale~
%patch88 -p1 -b .gold~ %patch88 -p1 -b .gold~
%patch100 -p1 -b .blowfish_nonx86~ %patch100 -p1 -b .blowfish_nonx86~
@ -912,7 +873,6 @@ autoconf
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
%build %build
# ... # ...
[ -d ports ] || ln -s ../ports .
mkdir bin mkdir bin
ln -sf %{_bindir}/ld.bfd bin/ld ln -sf %{_bindir}/ld.bfd bin/ld
export PATH=$PWD/bin:$PATH export PATH=$PWD/bin:$PATH
@ -1002,18 +962,15 @@ function BuildGlibc() {
fi fi
%endif %endif
# NPTL+TLS are now the default
Pthreads="nptl"
# Add-ons # Add-ons
AddOns="$Pthreads,ports,libidn" AddOns="libidn"
# Force a separate and clean object dir # Force a separate and clean object dir
rm -rf build-$arch-linux rm -rf build-$arch-linux
mkdir build-$arch-linux mkdir build-$arch-linux
pushd build-$arch-linux pushd build-$arch-linux
[[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main" [[ "$BuildAltArch" = "yes" ]] && touch ".alt" || touch ".main"
CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags" LDFLAGS="%{ldflags} -fuse-ld=bfd" ../configure \ CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error" LDFLAGS="%{ldflags} -fuse-ld=bfd" ../configure \
$arch-%{_target_vendor}-%{_target_os}%{?_gnu} \ $arch-%{_target_vendor}-%{_target_os}%{?_gnu} \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libexecdir=%{_prefix}/libexec \ --libexecdir=%{_prefix}/libexec \
@ -1143,7 +1100,7 @@ esac
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include # NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
# the generic one (RH#162634) # the generic one (RH#162634)
install -m644 bits/stdio-lock.h -D %{buildroot}%{_includedir}/bits/stdio-lock.h install -m644 sysdeps/generic/stdio-lock.h -D %{buildroot}%{_includedir}/bits/stdio-lock.h
# And <bits/libc-lock.h> needs sanitizing as well. # And <bits/libc-lock.h> needs sanitizing as well.
install -m644 %{SOURCE10} -D %{buildroot}%{_includedir}/bits/libc-lock.h install -m644 %{SOURCE10} -D %{buildroot}%{_includedir}/bits/libc-lock.h
@ -1303,7 +1260,7 @@ rm -f %{buildroot}%{_infodir}/dir
rm -rf %{buildroot}%{_datadir}/i18n rm -rf %{buildroot}%{_datadir}/i18n
%endif %endif
%if ! %{without locales} %if %{with locales}
export PATH=%{buildroot}%{_bindir}:%{buildroot}%{_sbindir}:$PATH export PATH=%{buildroot}%{_bindir}:%{buildroot}%{_sbindir}:$PATH
export LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}%{_libdir}:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}%{_libdir}:$LD_LIBRARY_PATH
export I18NPATH=%{buildroot}%{_datadir}/i18n export I18NPATH=%{buildroot}%{_datadir}/i18n