]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix resolver bind, getsockname namespace (bug 17733).
authorJoseph Myers <joseph@codesourcery.com>
Mon, 22 Dec 2014 12:46:27 +0000 (12:46 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 22 Dec 2014 12:46:27 +0000 (12:46 +0000)
On Linux architectures using socketcall, the resolver ends up bringing
in strong symbols for bind and getsockname, which are not in
POSIX.1-1996.  This causes linknamespace test failures:

FAIL: conform/POSIX/pthread.h/linknamespace
FAIL: conform/POSIX/sched.h/linknamespace
FAIL: conform/POSIX/time.h/linknamespace

These functions are defined as strong symbols with __bind and
__getsockname as weak aliases.  This patch switches this to the other
way round by removing the NO_WEAK_ALIAS definitions and so letting the
default case in socket.S act; I see no reason for the existing
arrangements.

Tested for x86 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).

[BZ #17733]
* sysdeps/unix/sysv/linux/bind.S (NO_WEAK_ALIAS): Do not define.
(__bind): Do not define as weak alias.
* sysdeps/unix/sysv/linux/getsockname.S (NO_WEAK_ALIAS): Do not
define.
(__getsockname): Do not define as weak alias.

ChangeLog
NEWS
sysdeps/unix/sysv/linux/bind.S
sysdeps/unix/sysv/linux/getsockname.S

index 99c248c575784e8aaff42f3a0784109e1955aa4c..7279fcc2163ec0c92afc724452f4aee28afb48bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-12-22  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #17733]
+       * sysdeps/unix/sysv/linux/bind.S (NO_WEAK_ALIAS): Do not define.
+       (__bind): Do not define as weak alias.
+       * sysdeps/unix/sysv/linux/getsockname.S (NO_WEAK_ALIAS): Do not
+       define.
+       (__getsockname): Do not define as weak alias.
+
 2014-12-22  Will Newton  <will.newton@linaro.org>
 
        * manual/install.texi: Document that we require bison 2.7
diff --git a/NEWS b/NEWS
index 6b34b134571c050ac4b2c65aafa1c0d477b32281..a40deb034195048a364d7d4d787548496e88ec62 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@ Version 2.21
   17522, 17555, 17570, 17571, 17572, 17573, 17574, 17581, 17582, 17583,
   17584, 17585, 17589, 17594, 17601, 17608, 17616, 17625, 17630, 17633,
   17634, 17647, 17653, 17657, 17664, 17665, 17668, 17682, 17717, 17719,
-  17722, 17725.
+  17722, 17725, 17733.
 
 * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
   under certain input conditions resulting in the execution of a shell for
index 7719ad0be8bb6c2ad6c2722393b44f148a19de1c..61fb5ebff889e64f404f488f38b5304a478c3b90 100644 (file)
@@ -1,5 +1,3 @@
 #define        socket  bind
 #define        NARGS   3
-#define NO_WEAK_ALIAS  1
 #include <socket.S>
-weak_alias (bind, __bind)
index 9ea371ff6e38be7b860a7041d322b18fc7a2d096..c138be9da555086f64fcc981906fd870a6f36c5d 100644 (file)
@@ -1,5 +1,3 @@
 #define        socket  getsockname
 #define        NARGS   3
-#define NO_WEAK_ALIAS  1
 #include <socket.S>
-weak_alias (getsockname, __getsockname)