This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.21-467-g5371d99


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  5371d99e8766f25864ddf20fb0866e57fc0b7991 (commit)
      from  a82a3db95077c8343b988a6f1b03adea3d40f6d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5371d99e8766f25864ddf20fb0866e57fc0b7991

commit 5371d99e8766f25864ddf20fb0866e57fc0b7991
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Jun 12 20:02:30 2015 +0000

    Fix getlogin_r namespace (bug 18527).
    
    Various functions in XPG4 bring in references to getlogin_r, which is
    not in XPG4; this is also a bug for some older POSIX versions which
    aren't yet covered by the linknamespace tests.  This patch fixes this
    by making getlogin_r into a weak alias for __getlogin_r and using
    __getlogin_r as needed.
    
    Tested for x86_64 and x86 (testsuite, and that disassembly of
    installed stripped shared libraries is unchanged by the patch).
    
    	[BZ #18527]
    	* login/getlogin_r.c (getlogin_r): Rename to __getlogin_r and
    	define as weak alias of __getlogin_r.  Use libc_hidden_weak.
    	* sysdeps/mach/hurd/getlogin_r.c (getlogin_r): Likewise.
    	* sysdeps/unix/getlogin_r.c (getlogin_r): Likewise.
    	* sysdeps/unix/sysv/linux/getlogin_r.c (getlogin_r): Likewise.
    	* include/unistd.h (__getlogin_r): Declare.  Use
    	libc_hidden_proto.
    	* posix/glob.c (glob): Call __getlogin_r instead of getlogin_r.
    	* conform/Makefile (test-xfail-XPG3/glob.h/linknamespace): Remove
    	variable.
    	(test-xfail-XPG3/wordexp.h/linknamespace): Likewise.
    	(test-xfail-XPG4/glob.h/linknamespace): Likewise.
    	(test-xfail-XPG4/wordexp.h/linknamespace): Likewise.

diff --git a/ChangeLog b/ChangeLog
index ba9f629..9403f28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2015-06-12  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #18527]
+	* login/getlogin_r.c (getlogin_r): Rename to __getlogin_r and
+	define as weak alias of __getlogin_r.  Use libc_hidden_weak.
+	* sysdeps/mach/hurd/getlogin_r.c (getlogin_r): Likewise.
+	* sysdeps/unix/getlogin_r.c (getlogin_r): Likewise.
+	* sysdeps/unix/sysv/linux/getlogin_r.c (getlogin_r): Likewise.
+	* include/unistd.h (__getlogin_r): Declare.  Use
+	libc_hidden_proto.
+	* posix/glob.c (glob): Call __getlogin_r instead of getlogin_r.
+	* conform/Makefile (test-xfail-XPG3/glob.h/linknamespace): Remove
+	variable.
+	(test-xfail-XPG3/wordexp.h/linknamespace): Likewise.
+	(test-xfail-XPG4/glob.h/linknamespace): Likewise.
+	(test-xfail-XPG4/wordexp.h/linknamespace): Likewise.
+
 2015-06-12  Martin Sebor  <msebor@redhat.com>
 
 	[BZ #18512]
diff --git a/NEWS b/NEWS
index da8bccf..b9b4ce2 100644
--- a/NEWS
+++ b/NEWS
@@ -21,7 +21,7 @@ Version 2.22
   18211, 18217, 18220, 18221, 18234, 18244, 18247, 18287, 18319, 18324,
   18333, 18346, 18397, 18409, 18410, 18412, 18418, 18422, 18434, 18444,
   18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498, 18507,
-  18512, 18519, 18520, 18522.
+  18512, 18519, 18520, 18522, 18527.
 
 * Cache information can be queried via sysconf() function on s390 e.g. with
   _SC_LEVEL1_ICACHE_SIZE as argument.
diff --git a/conform/Makefile b/conform/Makefile
index 8c11dc4..57dbc92 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -345,15 +345,11 @@ test-xfail-XOPEN2K/ndbm.h/linknamespace = yes
 test-xfail-XOPEN2K8/ndbm.h/linknamespace = yes
 
 # Unsorted expected failures.
-test-xfail-XPG3/glob.h/linknamespace = yes
 test-xfail-XPG3/unistd.h/linknamespace = yes
-test-xfail-XPG3/wordexp.h/linknamespace = yes
 test-xfail-XPG4/fmtmsg.h/linknamespace = yes
-test-xfail-XPG4/glob.h/linknamespace = yes
 test-xfail-XPG4/netdb.h/linknamespace = yes
 test-xfail-XPG4/syslog.h/linknamespace = yes
 test-xfail-XPG4/unistd.h/linknamespace = yes
-test-xfail-XPG4/wordexp.h/linknamespace = yes
 test-xfail-POSIX/mqueue.h/linknamespace = yes
 test-xfail-POSIX/semaphore.h/linknamespace = yes
 test-xfail-UNIX98/fmtmsg.h/linknamespace = yes
diff --git a/include/unistd.h b/include/unistd.h
index 762acc0..61df3af 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -14,6 +14,8 @@ libc_hidden_proto (execvp)
 libc_hidden_proto (getpid)
 libc_hidden_proto (getsid)
 libc_hidden_proto (getdomainname)
+extern __typeof (getlogin_r) __getlogin_r  __nonnull ((1));
+libc_hidden_proto (__getlogin_r)
 libc_hidden_proto (getlogin_r)
 libc_hidden_proto (seteuid)
 libc_hidden_proto (setegid)
diff --git a/login/getlogin_r.c b/login/getlogin_r.c
index a49fb4a..8848b61 100644
--- a/login/getlogin_r.c
+++ b/login/getlogin_r.c
@@ -23,13 +23,15 @@
    If it cannot be determined or some other error occurred, return the error
    code.  Otherwise return 0.  */
 int
-getlogin_r (name, name_len)
+__getlogin_r (name, name_len)
      char *name;
      size_t name_len;
 {
   __set_errno (ENOSYS);
   return errno;
 }
-libc_hidden_def (getlogin_r)
+libc_hidden_def (__getlogin_r)
+weak_alias (__getlogin_r, getlogin_r)
+libc_hidden_weak (getlogin_r)
 
 stub_warning (getlogin_r)
diff --git a/posix/glob.c b/posix/glob.c
index 5b92776..d65e55d 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -619,7 +619,7 @@ glob (pattern, flags, errfunc, pglob)
 		buflen = 20;
 	      name = alloca_account (buflen, alloca_used);
 
-	      success = getlogin_r (name, buflen) == 0;
+	      success = __getlogin_r (name, buflen) == 0;
 	      if (success)
 		{
 		  struct passwd *p;
diff --git a/sysdeps/mach/hurd/getlogin_r.c b/sysdeps/mach/hurd/getlogin_r.c
index f1c2951..9c66f86 100644
--- a/sysdeps/mach/hurd/getlogin_r.c
+++ b/sysdeps/mach/hurd/getlogin_r.c
@@ -25,7 +25,7 @@
    If it cannot be determined or some other error occurred, return the error
    code.  Otherwise return 0.  */
 int
-getlogin_r (name, name_len)
+__getlogin_r (name, name_len)
      char *name;
      size_t name_len;
 {
@@ -45,4 +45,6 @@ getlogin_r (name, name_len)
   memcpy (name, login, len);
   return 0;
 }
-libc_hidden_def (getlogin_r)
+libc_hidden_def (__getlogin_r)
+weak_alias (__getlogin_r, getlogin_r)
+libc_hidden_weak (getlogin_r)
diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c
index 4a31d25..8bb3de5 100644
--- a/sysdeps/unix/getlogin_r.c
+++ b/sysdeps/unix/getlogin_r.c
@@ -34,7 +34,7 @@
 STATIC
 #endif
 int
-getlogin_r (name, name_len)
+__getlogin_r (name, name_len)
      char *name;
      size_t name_len;
 {
@@ -99,5 +99,7 @@ getlogin_r (name, name_len)
   return result;
 }
 #ifndef STATIC
-libc_hidden_def (getlogin_r)
+libc_hidden_def (__getlogin_r)
+weak_alias (__getlogin_r, getlogin_r)
+libc_hidden_weak (getlogin_r)
 #endif
diff --git a/sysdeps/unix/sysv/linux/getlogin_r.c b/sysdeps/unix/sysv/linux/getlogin_r.c
index 2c52b21..aa61f61 100644
--- a/sysdeps/unix/sysv/linux/getlogin_r.c
+++ b/sysdeps/unix/sysv/linux/getlogin_r.c
@@ -21,9 +21,9 @@
 
 #define STATIC static
 static int getlogin_r_fd0 (char *name, size_t namesize);
-#define getlogin_r getlogin_r_fd0
+#define __getlogin_r getlogin_r_fd0
 #include <sysdeps/unix/getlogin_r.c>
-#undef getlogin_r
+#undef __getlogin_r
 
 
 /* Try to determine login name from /proc/self/loginuid and return 0
@@ -109,7 +109,7 @@ __getlogin_r_loginuid (name, namesize)
    code.  Otherwise return 0.  */
 
 int
-getlogin_r (name, namesize)
+__getlogin_r (name, namesize)
      char *name;
      size_t namesize;
 {
@@ -119,4 +119,6 @@ getlogin_r (name, namesize)
 
   return getlogin_r_fd0 (name, namesize);
 }
-libc_hidden_def (getlogin_r)
+libc_hidden_def (__getlogin_r)
+weak_alias (__getlogin_r, getlogin_r)
+libc_hidden_weak (getlogin_r)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                            |   17 +++++++++++++++++
 NEWS                                 |    2 +-
 conform/Makefile                     |    4 ----
 include/unistd.h                     |    2 ++
 login/getlogin_r.c                   |    6 ++++--
 posix/glob.c                         |    2 +-
 sysdeps/mach/hurd/getlogin_r.c       |    6 ++++--
 sysdeps/unix/getlogin_r.c            |    6 ++++--
 sysdeps/unix/sysv/linux/getlogin_r.c |   10 ++++++----
 9 files changed, 39 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]