forked from pool/glibc
Accepting request 83462 from home:a_jaeger:branches:openSUSE:Factory
incorporate some fixes. OBS-URL: https://build.opensuse.org/request/show/83462 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=106
This commit is contained in:
parent
89c17cfdd5
commit
b95761bac7
@ -1,14 +0,0 @@
|
||||
Index: glibc-2.14/libio/fileops.c
|
||||
===================================================================
|
||||
--- glibc-2.14.orig/libio/fileops.c
|
||||
+++ glibc-2.14/libio/fileops.c
|
||||
@@ -338,7 +338,8 @@ _IO_new_file_fopen (fp, filename, mode,
|
||||
is32not64);
|
||||
|
||||
#ifndef __ASSUME_O_CLOEXEC
|
||||
- if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
|
||||
+ if ((result != NULL)
|
||||
+ && (fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
|
||||
{
|
||||
int fd = _IO_fileno (fp);
|
||||
if (__have_o_cloexec == 0)
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:497c07f228208e8a0660ae5ee8919e4a6b5b59bb867891c7c02de8995310960e
|
||||
size 15640100
|
3
glibc-2.14-69c1dfc1a796.tar.bz2
Normal file
3
glibc-2.14-69c1dfc1a796.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e2455ca82dd99d898d8000fc0b6130d4ab80a5394fe3c1dfa6b5e9c894a73384
|
||||
size 15640243
|
@ -353,237 +353,6 @@ index 87bb5f0..4f6bbfd 100644
|
||||
|
||||
HP_TIMING_DIFF (relocate_time, start, stop);
|
||||
|
||||
commit e888bcbe4fb8ad538ec640bfb18b687d51e001e7
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Mon Aug 22 16:08:16 2011 -0400
|
||||
|
||||
Correct cycle detection during dependency sorting
|
||||
|
||||
2011-08-16 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
[BZ #11724]
|
||||
* elf/dl-deps.c (_dl_map_object_deps): Only assume cycle when
|
||||
object is seen twice.
|
||||
* elf/dl-fini.c (_dl_sort_fini): Likewise.
|
||||
|
||||
* elf/Makefile (distribute): Add tst-initorder2.c.
|
||||
(tests): Add tst-initorder2.
|
||||
(modules-names): Add tst-initorder2a tst-initorder2b
|
||||
tst-initorder2c tst-initorder2d. Add rules to build them.
|
||||
($(objpfx)tst-initorder2.out): New rule.
|
||||
* elf/tst-initorder2.c: New file.
|
||||
* elf/tst-initorder2.exp: New file.
|
||||
|
||||
2011-08-21 Ulrich Drepper <drepper@gmail.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/x86_64/gettimeofday.S: Removed.
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index 709b61d..aeb6393 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -120,9 +120,10 @@ distribute := rtld-Rules \
|
||||
ifuncmain7pie.c ifuncmain7static.c \
|
||||
tst-unique1.c tst-unique1mod1.c tst-unique1mod2.c \
|
||||
tst-unique2.c tst-unique2mod1.c tst-unique2mod2.c \
|
||||
- tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
|
||||
- tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
|
||||
- tst-initorder.c
|
||||
+ tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
|
||||
+ tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
|
||||
+ tst-initorder.c \
|
||||
+ tst-initorder2.c
|
||||
|
||||
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
|
||||
@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
|
||||
tst-audit1 tst-audit2 \
|
||||
tst-stackguard1 tst-addr1 tst-thrlock \
|
||||
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
|
||||
- tst-initorder
|
||||
+ tst-initorder tst-initorder2
|
||||
# reldep9
|
||||
test-srcs = tst-pathopt
|
||||
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
|
||||
@@ -288,7 +289,8 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
|
||||
tst-unique4lib \
|
||||
tst-initordera1 tst-initorderb1 \
|
||||
tst-initordera2 tst-initorderb2 \
|
||||
- tst-initordera3 tst-initordera4
|
||||
+ tst-initordera3 tst-initordera4 \
|
||||
+ tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
|
||||
ifeq (yes,$(have-initfini-array))
|
||||
modules-names += tst-array2dep tst-array5dep
|
||||
endif
|
||||
@@ -1157,6 +1159,23 @@ $(objpfx)tst-initorder.out: $(objpfx)tst-initorder
|
||||
$< > $@
|
||||
cmp $@ tst-initorder.exp > /dev/null
|
||||
|
||||
+$(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so $(objpfx)tst-initorder2c.so
|
||||
+$(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
|
||||
+$(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
|
||||
+$(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
|
||||
+define o-iterator-doit
|
||||
+$(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
|
||||
+$$(compile-command.c) -DNAME=\"$o\"
|
||||
+endef
|
||||
+object-suffixes-left := a b c d
|
||||
+include $(o-iterator)
|
||||
+
|
||||
+$(objpfx)tst-initorder2.out: $(objpfx)tst-initorder2
|
||||
+ $(elf-objpfx)${rtld-installed-name} \
|
||||
+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
|
||||
+ $< > $@
|
||||
+ cmp $@ tst-initorder2.exp > /dev/null
|
||||
+
|
||||
ifeq (yes,$(config-cflags-avx))
|
||||
AVX-CFLAGS=-mavx
|
||||
ifeq (yes,$(config-cflags-novzeroupper))
|
||||
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
|
||||
index 0b03b90..cc0023d 100644
|
||||
--- a/elf/dl-deps.c
|
||||
+++ b/elf/dl-deps.c
|
||||
@@ -626,12 +626,12 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||
/* We can skip looking for the binary itself which is at the front
|
||||
of the search list. */
|
||||
i = 1;
|
||||
- bool seen[nlist];
|
||||
- memset (seen, false, nlist * sizeof (seen[0]));
|
||||
+ char seen[nlist];
|
||||
+ memset (seen, 0, nlist * sizeof (seen[0]));
|
||||
while (1)
|
||||
{
|
||||
/* Keep track of which object we looked at this round. */
|
||||
- seen[i] = true;
|
||||
+ seen[i] += seen[i] < 2;
|
||||
struct link_map *thisp = l_initfini[i];
|
||||
|
||||
/* Find the last object in the list for which the current one is
|
||||
@@ -652,15 +652,16 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||
(k - i) * sizeof (l_initfini[0]));
|
||||
l_initfini[k] = thisp;
|
||||
|
||||
- if (seen[i + 1])
|
||||
+ if (seen[i + 1] > 1)
|
||||
{
|
||||
++i;
|
||||
goto next_clear;
|
||||
}
|
||||
|
||||
+ char this_seen = seen[i];
|
||||
memmove (&seen[i], &seen[i + 1],
|
||||
(k - i) * sizeof (seen[0]));
|
||||
- seen[k] = true;
|
||||
+ seen[k] = this_seen;
|
||||
|
||||
goto next;
|
||||
}
|
||||
@@ -671,7 +672,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||
if (++i == nlist)
|
||||
break;
|
||||
next_clear:
|
||||
- memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
|
||||
+ memset (&seen[i], 0, (nlist - i) * sizeof (seen[0]));
|
||||
|
||||
next:;
|
||||
}
|
||||
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
|
||||
index 0a138e9..bafc83a 100644
|
||||
--- a/elf/dl-fini.c
|
||||
+++ b/elf/dl-fini.c
|
||||
@@ -39,12 +39,12 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
|
||||
/* We can skip looking for the binary itself which is at the front
|
||||
of the search list for the main namespace. */
|
||||
unsigned int i = ns == LM_ID_BASE;
|
||||
- bool seen[nmaps];
|
||||
- memset (seen, false, nmaps * sizeof (seen[0]));
|
||||
+ char seen[nmaps];
|
||||
+ memset (seen, 0, nmaps * sizeof (seen[0]));
|
||||
while (1)
|
||||
{
|
||||
/* Keep track of which object we looked at this round. */
|
||||
- seen[i] = true;
|
||||
+ seen[i] += seen[i] < 2;
|
||||
struct link_map *thisp = maps[i];
|
||||
|
||||
/* Do not handle ld.so in secondary namespaces and object which
|
||||
@@ -79,14 +79,15 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
|
||||
used[k] = here_used;
|
||||
}
|
||||
|
||||
- if (seen[i + 1])
|
||||
+ if (seen[i + 1] > 1)
|
||||
{
|
||||
++i;
|
||||
goto next_clear;
|
||||
}
|
||||
|
||||
+ char this_seen = seen[i];
|
||||
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
|
||||
- seen[k] = true;
|
||||
+ seen[k] = this_seen;
|
||||
|
||||
goto next;
|
||||
}
|
||||
@@ -96,7 +97,7 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
|
||||
unsigned int m = maps[k]->l_reldeps->act;
|
||||
struct link_map **relmaps = &maps[k]->l_reldeps->list[0];
|
||||
|
||||
- /* Look through the relocation dependencies of the object. */
|
||||
+ /* Look through the relocation dependencies of the object. */
|
||||
while (m-- > 0)
|
||||
if (__builtin_expect (relmaps[m] == thisp, 0))
|
||||
goto move;
|
||||
@@ -109,7 +110,7 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
|
||||
if (++i == nmaps)
|
||||
break;
|
||||
next_clear:
|
||||
- memset (&seen[i], false, (nmaps - i) * sizeof (seen[0]));
|
||||
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
|
||||
|
||||
next:;
|
||||
}
|
||||
diff --git a/elf/tst-initorder2.c b/elf/tst-initorder2.c
|
||||
new file mode 100644
|
||||
index 0000000..050f956
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-initorder2.c
|
||||
@@ -0,0 +1,20 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#ifndef NAME
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ puts ("main");
|
||||
+}
|
||||
+#else
|
||||
+static void __attribute__ ((constructor))
|
||||
+init (void)
|
||||
+{
|
||||
+ puts ("init: " NAME);
|
||||
+}
|
||||
+static void __attribute__ ((destructor))
|
||||
+fini (void)
|
||||
+{
|
||||
+ puts ("fini: " NAME);
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/elf/tst-initorder2.exp b/elf/tst-initorder2.exp
|
||||
new file mode 100644
|
||||
index 0000000..5169489
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-initorder2.exp
|
||||
@@ -0,0 +1,9 @@
|
||||
+init: d
|
||||
+init: c
|
||||
+init: b
|
||||
+init: a
|
||||
+main
|
||||
+fini: a
|
||||
+fini: b
|
||||
+fini: c
|
||||
+fini: d
|
||||
|
||||
commit ef60624956e93df1da329a48570776ed963b1916
|
||||
Author: Ulrich Drepper <drepper@gmail.com>
|
||||
Date: Tue Sep 6 00:12:18 2011 -0400
|
||||
|
@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 19 08:09:40 UTC 2011 - opensuse@cboltz.de
|
||||
|
||||
- move usr.sbin.nscd apparmor profile back to apparmor-profiles package
|
||||
(bnc#647718)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 19 07:45:36 UTC 2011 - aj@suse.de
|
||||
|
||||
- Update to 2.14 git version 69c1dfc1a796, it contains backports from
|
||||
glibc trunk:
|
||||
+ Fix setxid race handling exiting threads
|
||||
+ Fix cfi directives in x86-64 and i386 code
|
||||
+ Fix scope handling during dl_close
|
||||
+ Fix spurious nop at start of __strspn_ia32
|
||||
+ Correct cycle detection during dependency sorting
|
||||
+ Fix fopen (non-existing-file, "re") errno (Obsoletes patch
|
||||
fopen-close-exec.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 16 11:20:29 UTC 2011 - mmarek@suse.cz
|
||||
|
||||
|
10
glibc.spec
10
glibc.spec
@ -82,11 +82,10 @@ Version: 2.14
|
||||
Release: 11
|
||||
Url: http://www.gnu.org/software/libc/libc.html
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source: glibc-%{version}-4eddf93f5cc2.tar.bz2
|
||||
Source: glibc-%{version}-69c1dfc1a796.tar.bz2
|
||||
Source2: http://ftp.gnu.org/gnu/glibc/glibc-ports-2.14.tar.bz2
|
||||
Source3: noversion.tar.bz2
|
||||
Source4: manpages.tar.bz2
|
||||
Source5: usr.sbin.nscd
|
||||
Source8: nsswitch.conf
|
||||
Source9: nscd.init
|
||||
Source10: bindresvport.blacklist
|
||||
@ -198,8 +197,6 @@ Patch66: glibc2.14-revert-sunrpc-removal.patch
|
||||
Patch67: glibc-revert-fseek-on-fclose.diff
|
||||
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140 matz@suse.de
|
||||
Patch68: glibc-fix-lookup-crash.patch
|
||||
# PATCH-FIX-UPSTREAM Fix fopen("non-existing-file", "re") errno bnc#713146 aj@suse.de
|
||||
Patch69: fopen-close-exec.patch
|
||||
# PATCH-FIX-UPSTREAM Add vdso support to support Linux 3.1, fix order of relocations aj@suse.de
|
||||
Patch70: glibc-2.15-vsyscall.patch
|
||||
# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running the i686 library, as valgrind does. bnc#681398 aj@suse.de
|
||||
@ -441,7 +438,6 @@ rm nscd/s-stamp
|
||||
%patch66 -p1
|
||||
%patch67 -p1
|
||||
%patch68 -p1
|
||||
%patch69 -p1
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
%patch72 -p1
|
||||
@ -792,8 +788,6 @@ popd
|
||||
# nscd tools:
|
||||
|
||||
cp nscd/nscd.conf %{buildroot}/etc
|
||||
mkdir -p %{buildroot}/etc/apparmor.d
|
||||
cp $RPM_SOURCE_DIR/usr.sbin.nscd %{buildroot}/etc/apparmor.d
|
||||
mkdir -p %{buildroot}/etc/init.d
|
||||
install -m 755 $RPM_SOURCE_DIR/nscd.init %{buildroot}/etc/init.d/nscd
|
||||
ln -sf /etc/init.d/nscd %{buildroot}/usr/sbin/rcnscd
|
||||
@ -1099,8 +1093,6 @@ exit 0
|
||||
%files -n nscd
|
||||
%defattr(-,root,root)
|
||||
%config(noreplace) /etc/nscd.conf
|
||||
%dir /etc/apparmor.d
|
||||
%config /etc/apparmor.d/usr.sbin.nscd
|
||||
%config /etc/init.d/nscd
|
||||
%{_sbindir}/nscd
|
||||
%{_sbindir}/rcnscd
|
||||
|
@ -1,45 +0,0 @@
|
||||
# ------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (C) 2002-2005 Novell/SUSE
|
||||
# Copyright (C) 2009-2010 Canonical Ltd.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of version 2 of the GNU General Public
|
||||
# License published by the Free Software Foundation.
|
||||
#
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
#include <tunables/global>
|
||||
/usr/sbin/nscd {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/consoles>
|
||||
#include <abstractions/nameservice>
|
||||
#include <abstractions/ssl_certs>
|
||||
|
||||
capability net_bind_service,
|
||||
|
||||
network inet dgram,
|
||||
network inet stream,
|
||||
|
||||
/etc/netgroup r,
|
||||
/etc/nscd.conf r,
|
||||
/tmp/.winbindd/pipe rw,
|
||||
/usr/sbin/nscd rmix,
|
||||
/var/lib/samba/winbindd_privileged/pipe rw,
|
||||
/{,var/}run/.nscd_socket wl,
|
||||
/{,var/}run/avahi-daemon/socket w,
|
||||
/{,var/}run/nscd/ rw,
|
||||
/{,var/}run/nscd/db* wl,
|
||||
/{,var/}run/nscd/socket wl,
|
||||
/var/{cache,run}/nscd/{passwd,group,services,hosts} rw,
|
||||
/{,var/}run/{nscd/,}nscd.pid rwl,
|
||||
/var/log/nscd.log rw,
|
||||
@{PROC}/[0-9]*/fd/ r,
|
||||
@{PROC}/[0-9]*/fd/* r,
|
||||
@{PROC}/[0-9]*/maps r,
|
||||
@{PROC}/[0-9]*/mounts r,
|
||||
@{PROC}/filesystems r,
|
||||
|
||||
# Site-specific additions and overrides. See local/README for details.
|
||||
#include <local/usr.sbin.nscd>
|
||||
}
|
Loading…
Reference in New Issue
Block a user