glibc/login
Joseph Myers 5371d99e87 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.
2015-06-12 20:02:30 +00:00
..
programs Update copyright dates not handled by scripts/update-copyrights. 2015-01-02 16:54:45 +00:00
Makefile Move tst-getlogin to login/ subdirectory. 2015-02-06 12:29:27 -08:00
Versions Move getlogin_r_chk to login/ subdir. 2013-05-06 15:58:44 -07:00
endutxent.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
forkpty.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getlogin.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getlogin_r.c Fix getlogin_r namespace (bug 18527). 2015-06-12 20:02:30 +00:00
getlogin_r_chk.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutent.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutent_r.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutid.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutid_r.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutline.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutline_r.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutmpx.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutxent.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutxid.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getutxline.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
grantpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lastlog.h Update. 1997-06-21 02:59:26 +00:00
login.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
login_tty.c * login/login_tty.c (login_tty): The Linux kernel can return EBUSY 2007-10-04 21:54:22 +00:00
logout.c Remove some references to bcopy/bcmp/bzero. 2015-01-13 11:12:55 -08:00
logwtmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
openpty.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ptsname.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ptsname_r_chk.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
pty.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
pututxline.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setlogin.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setutxent.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-getlogin.c Move tst-getlogin to login/ subdirectory. 2015-02-06 12:29:27 -08:00
tst-grantpt.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-ptsname.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-utmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
tst-utmpx.c Update. 1998-06-02 12:58:14 +00:00
unlockpt.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
updwtmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
updwtmpx.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
utmp-private.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
utmp.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
utmp_file.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
utmpname.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
utmpxname.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00