aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-14 01:03:16 +0000
committerRoland McGrath <roland@gnu.org>2002-10-14 01:03:16 +0000
commit747bf98ea9d04ea68e61510f955276da5704d7fc (patch)
tree5bdfdb4d8bd40302294f4fc8bc6321042a04eca2
parent6bdcd619a46d21f536ce57304da9c660f8f0c42f (diff)
downloadglibc-747bf98ea9d04ea68e61510f955276da5704d7fc.tar.xz
glibc-747bf98ea9d04ea68e61510f955276da5704d7fc.zip
* elf/rtld-Rules ($(objpfx)rtld-libc.a): Use $(verbose) in ar command.
* sysdeps/mach/hurd/getresuid.c: New file. * sysdeps/mach/hurd/getresgid.c: New file. * sysdeps/mach/hurd/setresuid.c: New file. * sysdeps/mach/hurd/setresgid.c: New file. * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid, setresgid): Declare them. * NEWS: Mention it. * include/unistd.h (__getresuid, __getresgid, __setresuid, __setresgid): Declare them, add libc_hidden_proto. * posix/Versions (libc: GLIBC_2.3.2): New set. Add getresuid, getresgid, setresuid, setresgid here. * Versions.def (libc): Define GLIBC_2.3.2 set. * sysdeps/generic/getresuid.c (__getresuid): Fix argument types. Add libc_hidden_def. * sysdeps/generic/getresgid.c (__getresgid): Likewise. * sysdeps/generic/setresgid.c: New file. * sysdeps/generic/setresuid.c: New file. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (sysdep_routines): Don't add getresuid and getresgid here. * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc] (sysdep_routines): Don't add setresuid and setresgid here. * sysdeps/unix/sysv/linux/cris/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. * posix/Makefile (routines): Add them all here instead. * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to __getresuid. Add libc_hidden_def for that, and weak alias to old name. * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to __getresgid. Add libc_hidden_def for that, and weak alias to old name. * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def. [! __NR_setresuid]: Include generic file. * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to __setresgid. Add libc_hidden_def for that, and weak alias to old name. [! __NR_setresuid]: Include generic file. * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): Caller is - now, not EXTRA. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (setresuid, setresgid, getresuid, getresgid): Likewise. * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid): Add these calls here. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc] (sysdep_routines): Add setfsuid and setfsgid here. * sysdeps/unix/sysv/linux/arm/Makefile: Not here. * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise. * sysdeps/unix/sysv/linux/cris/Makefile: Likewise. * sysdeps/unix/sysv/linux/sh/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise. * sysdeps/unix/sysv/linux/i386/Makefile: Likewise. * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise. * hurd/errno.c: Renamed to ... * hurd/errno-loc.c: ... this. * hurd/Makefile (routines): errno -> errno-loc
-rw-r--r--ChangeLog74
-rw-r--r--NEWS10
-rw-r--r--Versions.def1
-rw-r--r--elf/rtld-Rules10
-rw-r--r--hurd/Makefile4
-rw-r--r--hurd/errno-loc.c (renamed from hurd/errno.c)0
-rw-r--r--include/unistd.h8
-rw-r--r--posix/Makefile1
-rw-r--r--posix/Versions7
-rw-r--r--posix/unistd.h18
-rw-r--r--sysdeps/generic/getresgid.c7
-rw-r--r--sysdeps/generic/getresuid.c7
-rw-r--r--sysdeps/generic/setresgid.c35
-rw-r--r--sysdeps/generic/setresuid.c35
-rw-r--r--sysdeps/mach/hurd/getresgid.c62
-rw-r--r--sysdeps/mach/hurd/getresuid.c62
-rw-r--r--sysdeps/mach/hurd/setresgid.c77
-rw-r--r--sysdeps/mach/hurd/setresuid.c77
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/hppa/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/i386/getresgid.c7
-rw-r--r--sysdeps/unix/sysv/linux/i386/getresuid.c7
-rw-r--r--sysdeps/unix/sysv/linux/i386/setresgid.c13
-rw-r--r--sysdeps/unix/sysv/linux/i386/setresuid.c10
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/mips/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/Makefile4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/syscalls.list2
34 files changed, 521 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index 33f98b0f95..fb5b0ba9d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,77 @@
+2002-10-13 Roland McGrath <roland@frob.com>
+
+ * elf/rtld-Rules ($(objpfx)rtld-libc.a): Use $(verbose) in ar command.
+
+ * sysdeps/mach/hurd/getresuid.c: New file.
+ * sysdeps/mach/hurd/getresgid.c: New file.
+ * sysdeps/mach/hurd/setresuid.c: New file.
+ * sysdeps/mach/hurd/setresgid.c: New file.
+
+ * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid,
+ setresgid): Declare them.
+ * NEWS: Mention it.
+ * include/unistd.h
+ (__getresuid, __getresgid, __setresuid, __setresgid): Declare them,
+ add libc_hidden_proto.
+ * posix/Versions (libc: GLIBC_2.3.2): New set. Add
+ getresuid, getresgid, setresuid, setresgid here.
+ * Versions.def (libc): Define GLIBC_2.3.2 set.
+ * sysdeps/generic/getresuid.c (__getresuid): Fix argument types.
+ Add libc_hidden_def.
+ * sysdeps/generic/getresgid.c (__getresgid): Likewise.
+ * sysdeps/generic/setresgid.c: New file.
+ * sysdeps/generic/setresuid.c: New file.
+ * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
+ (sysdep_routines): Don't add getresuid and getresgid here.
+ * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc]
+ (sysdep_routines): Don't add setresuid and setresgid here.
+ * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
+ * posix/Makefile (routines): Add them all here instead.
+ * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to
+ __getresuid. Add libc_hidden_def for that, and weak alias to old name.
+ * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to
+ __getresgid. Add libc_hidden_def for that, and weak alias to old name.
+ * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def.
+ [! __NR_setresuid]: Include generic file.
+ * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to
+ __setresgid. Add libc_hidden_def for that, and weak alias to old name.
+ [! __NR_setresuid]: Include generic file.
+ * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
+ Caller is - now, not EXTRA.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
+ (setresuid, setresgid, getresuid, getresgid): Likewise.
+ * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid):
+ Add these calls here.
+ * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here.
+ * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
+
+ * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
+ (sysdep_routines): Add setfsuid and setfsgid here.
+ * sysdeps/unix/sysv/linux/arm/Makefile: Not here.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
+
+ * hurd/errno.c: Renamed to ...
+ * hurd/errno-loc.c: ... this.
+ * hurd/Makefile (routines): errno -> errno-loc
+
2002-10-13 Ulrich Drepper <drepper@redhat.com>
* po/de.po: Update from translation team.
diff --git a/NEWS b/NEWS
index 095ea50b6c..7d80d1ab45 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,18 @@
-GNU C Library NEWS -- history of user-visible changes. 2002-10-2
+GNU C Library NEWS -- history of user-visible changes. 2002-10-13
Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
See the end for copying conditions.
Please send GNU C library bug reports using the `glibcbug' script to
<bugs@gnu.org>. Please send questions and suggestions to <bug-glibc@gnu.org>.
+Version 2.3.2
+
+* The functions getresuid, getresgid, setresuid, and setresgid, which
+ have long been available on Linux, are now declared in <unistd.h>
+ and are now also available on the Hurd.
+
+* ELF thread-local storage support (TLS) now works on x86-64.
+
Version 2.3
* Masahide Washizawa contributed iconv modules for IBM1163 and IBM1164
diff --git a/Versions.def b/Versions.def
index fe32a8fbe5..d47fb5d38c 100644
--- a/Versions.def
+++ b/Versions.def
@@ -17,6 +17,7 @@ libc {
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.1
+ GLIBC_2.3.2
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index 03fe25d5cd..98bb24af9b 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -42,10 +42,18 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\
$(addprefix $(common-objpfx)$(dir)/rtld-,\
$(rtld-$(dir))))
@-rm -f $@T
- $(AR) cq $@T $^
+ $(AR) cq$(verbose) $@T $^
$(RANLIB) $@T
mv -f $@T $@
+# Use the verbose option of ar and tar when not running silently.
+ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
+verbose := v
+else # -s
+verbose :=
+endif # not -s
+
+
# For each subdirectory, define a pattern rule that makes all of that
# subdirectory's modules at once with one recursive make command.
object-suffixes-left := $(rtld-subdirs)
diff --git a/hurd/Makefile b/hurd/Makefile
index 9487c963cf..ccf596c918 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,92,93,94,95,96,97,98,99,2001
+# Copyright (C) 1991,92,93,94,95,96,97,98,99,2001,2002
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -59,7 +59,7 @@ routines = hurdstartup hurdinit \
fopenport \
vpprintf \
ports-get ports-set hurdports hurdmsg \
- errno \
+ errno-loc \
$(sig) $(dtable) $(inlines) port-cleanup report-wait
sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
diff --git a/hurd/errno.c b/hurd/errno-loc.c
index 85e4e7d47b..85e4e7d47b 100644
--- a/hurd/errno.c
+++ b/hurd/errno-loc.c
diff --git a/include/unistd.h b/include/unistd.h
index a5d15aaf37..21d248e1af 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -95,6 +95,14 @@ extern int __setgid (__gid_t __gid);
extern int __setpgid (__pid_t __pid, __pid_t __pgid);
libc_hidden_proto (__setpgid)
extern int __setregid (__gid_t __rgid, __gid_t __egid);
+extern int __getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
+extern int __getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
+extern int __setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
+extern int __setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
+libc_hidden_proto (__getresuid)
+libc_hidden_proto (__getresgid)
+libc_hidden_proto (__setresuid)
+libc_hidden_proto (__setresgid)
extern __pid_t __vfork (void);
extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
extern int __isatty (int __fd);
diff --git a/posix/Makefile b/posix/Makefile
index aebd8b3b4b..ede9d1fa1d 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -45,6 +45,7 @@ routines := \
getpid getppid \
getuid geteuid getgid getegid getgroups setuid setgid group_member \
getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
+ getresuid getresgid setresuid setresgid \
getlogin getlogin_r setlogin \
pathconf sysconf fpathconf \
glob glob64 fnmatch regex \
diff --git a/posix/Versions b/posix/Versions
index a5378d1d38..d20e552d11 100644
--- a/posix/Versions
+++ b/posix/Versions
@@ -109,6 +109,13 @@ libc {
# For syscall wrapper
__nanosleep;
}
+ GLIBC_2.3.2 {
+ # Note that these symbols appear in sysdeps/unix/sysv/linux/Versions
+ # under GLIBC_2.0; the first instance in the script is taken as the
+ # default, so linux configurations put them in GLIBC_2.0 while other
+ # configuration put them in GLIBC_2.3.2.
+ getresuid; getresgid; setresuid; setresgid;
+ }
GLIBC_PRIVATE {
# functions which have an additional interface since they are
# are cancelable.
diff --git a/posix/unistd.h b/posix/unistd.h
index 792c80af33..9c27c84ed0 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -640,6 +640,24 @@ extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW;
extern int setegid (__gid_t __gid) __THROW;
#endif /* Use BSD. */
+#ifdef __USE_GNU
+/* Fetch the effective user ID, real user ID, and saved-set user ID,
+ of the calling process. */
+extern int getresuid (__uid_t *__euid, __uid_t *__ruid, __uid_t *__suid);
+
+/* Fetch the effective group ID, real group ID, and saved-set group ID,
+ of the calling process. */
+extern int getresgid (__gid_t *__egid, __gid_t *__rgid, __gid_t *__sgid);
+
+/* Set the effective user ID, real user ID, and saved-set user ID,
+ of the calling process to EUID, RUID, and SUID, respectively. */
+extern int setresuid (__uid_t __euid, __uid_t __ruid, __uid_t __suid);
+
+/* Set the effective group ID, real group ID, and saved-set group ID,
+ of the calling process to EGID, RGID, and SGID, respectively. */
+extern int setresgid (__gid_t __egid, __gid_t __rgid, __gid_t __sgid);
+#endif
+
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
diff --git a/sysdeps/generic/getresgid.c b/sysdeps/generic/getresgid.c
index 92f9019393..d6a9b52957 100644
--- a/sysdeps/generic/getresgid.c
+++ b/sysdeps/generic/getresgid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1997,1998,2002 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
@@ -19,12 +19,15 @@
#include <errno.h>
#include <unistd.h>
+/* Fetch the effective group ID, real group ID, and saved-set group ID,
+ of the calling process. */
int
-__getresgid (gid_t egid, gid_t rgid, gid_t sgid)
+__getresgid (gid_t *egid, gid_t *rgid, gid_t *sgid)
{
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getresgid)
stub_warning (getresgid)
weak_alias (__getresgid, getresgid)
diff --git a/sysdeps/generic/getresuid.c b/sysdeps/generic/getresuid.c
index 1cf4326549..227d6b7ded 100644
--- a/sysdeps/generic/getresuid.c
+++ b/sysdeps/generic/getresuid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1995,1996,1997,1998,2002 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
@@ -19,12 +19,15 @@
#include <errno.h>
#include <unistd.h>
+/* Fetch the effective user ID, real user ID, and saved-set user ID,
+ of the calling process. */
int
-__getresuid (uid_t euid, uid_t ruid, uid_t suid)
+__getresuid (uid_t *euid, uid_t *ruid, uid_t *suid)
{
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getresuid)
stub_warning (getresuid)
weak_alias (__getresuid, getresuid)
diff --git a/sysdeps/generic/setresgid.c b/sysdeps/generic/setresgid.c
new file mode 100644
index 0000000000..78e308c5d0
--- /dev/null
+++ b/sysdeps/generic/setresgid.c
@@ -0,0 +1,35 @@
+/* setresgid -- set effective group ID, real group ID, and saved-set group ID
+ Copyright (C) 2002 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Set the effective group ID, real group ID, and saved-set group ID,
+ of the calling process to EGID, RGID, and SGID, respectively. */
+int
+__setresgid (gid_t egid, gid_t rgid, gid_t sgid)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+libc_hidden_def (__setresgid)
+stub_warning (setresgid)