]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2002-08-13 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Tue, 13 Aug 2002 00:22:49 +0000 (00:22 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 13 Aug 2002 00:22:49 +0000 (00:22 +0000)
* include/unistd.h (seteuid, setegid): Add libc_hidden_proto.
* sysdeps/generic/seteuid.c (seteuid): Add libc_hidden_def.
* sysdeps/generic/setegid.c (setegid): Likewise.
* sysdeps/mach/hurd/seteuid.c (seteuid): Likewise.
* sysdeps/mach/hurd/setegid.c (setegid): Likewise.
* sysdeps/unix/bsd/seteuid.c (seteuid): Likewise.
* sysdeps/unix/bsd/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/aix/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/aix/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/linux/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise.
Remove fallback if __ASSUME_SETRESUID_SYSCALL.

14 files changed:
sysdeps/generic/setegid.c
sysdeps/generic/seteuid.c
sysdeps/mach/hurd/setegid.c
sysdeps/mach/hurd/seteuid.c
sysdeps/unix/bsd/setegid.c
sysdeps/unix/bsd/seteuid.c
sysdeps/unix/sysv/aix/setegid.c
sysdeps/unix/sysv/aix/seteuid.c
sysdeps/unix/sysv/linux/i386/setegid.c
sysdeps/unix/sysv/linux/i386/seteuid.c
sysdeps/unix/sysv/linux/setegid.c
sysdeps/unix/sysv/linux/seteuid.c
sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c

index f2f2529a2b7e34ae40f2358911aaf186dbc1070d..5b5e2cf4bb5c093cec52e14f6411199d89c1c977 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1994,1995,1996,1997,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
@@ -27,7 +27,6 @@ setegid (gid)
   __set_errno (ENOSYS);
   return -1;
 }
-
-
+libc_hidden_def (setegid)
 stub_warning (setegid)
 #include <stub-tag.h>
index dbfa15bedb4c79d1ad82ffdab29a726130eb74f4..689000f9938f6cac531cba85525f9cbab6cf635f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 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
@@ -27,7 +27,6 @@ seteuid (uid)
   __set_errno (ENOSYS);
   return -1;
 }
-
-
+libc_hidden_def (seteuid)
 stub_warning (seteuid)
 #include <stub-tag.h>
index 10a93e58436b961b342623001482f57e64feaacd..c84b8e2e13d9535646aee3be40a8dcdd0969a833 100644 (file)
@@ -66,3 +66,4 @@ setegid (gid)
   __mach_port_deallocate (__mach_task_self (), newauth);
   return err;
 }
+libc_hidden_def (setegid)
index 3fd0b98cb1aabb494018f2a133d5ece1b7e28155..8a6effef8ee3c989ca2c1d37f2ef83c1f8c72558 100644 (file)
@@ -66,3 +66,4 @@ seteuid (uid)
   __mach_port_deallocate (__mach_task_self (), newauth);
   return err;
 }
+libc_hidden_def (seteuid)
index f6213aa6059d304c6eac08aa8a82596451301d1e..cc9f939bacc183de693620c435ae0ba6acaf8d26 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 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
@@ -32,3 +32,4 @@ setegid (gid)
 
   return __setregid (-1, gid);
 }
+libc_hidden_def (setegid)
index f46935cdf9da873a62e06d56f096e1f2740cbcbe..056b6583c5f718ee03840b44c54ddcd791811d63 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 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
@@ -32,3 +32,4 @@ seteuid (uid)
 
   return __setreuid (-1, uid);
 }
+libc_hidden_def (seteuid)
index 75e96e387c359b8d536198667037180d960a4633..75123cedfd2764baa01e54b21762cc1925a40ec5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 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
@@ -29,3 +29,4 @@ __setegid (gid_t gid)
   return setgidx (ID_EFFECTIVE, gid);
 }
 strong_alias (__setegid, setegid)
+libc_hidden_def (setegid)
index 17738e78b7c95b4e44c6aabed488cdd642d250be..6ea7e7ba03af9bbbd9eb5e423ac612a4be09b471 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 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
@@ -29,3 +29,4 @@ __seteuid (uid_t uid)
   return setuidx (ID_EFFECTIVE, uid);
 }
 strong_alias (__seteuid, seteuid)
+libc_hidden_def (seteuid)
index 880087c06401dc4d397c2e023dc8035a0c6010c5..8d7618cdd63a5da45c473a5e5a033506546d2a43 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 96, 97, 98, 2000, 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
@@ -25,3 +25,4 @@ setegid (gid)
 {
   return __setregid (-1, gid);
 }
+libc_hidden_def (setegid)
index bf38072e0dd0206cb480ac21838ef4525fbc0594..ba0b86d31873bc50ad9dbdfca533327917235bd8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 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
@@ -33,7 +33,11 @@ seteuid (uid_t uid)
   /* First try the syscall.  */
 #ifdef __NR_setresuid
   result = __setresuid (-1, uid, -1);
+#if __ASSUME_SETRESUID_SYSCALL > 0
+  if (0)
+#else
   if (result == -1 && errno == ENOSYS)
+#endif
     /* No system call available.  Use emulation.  This may not work
        since `setreuid' also sets the saved user ID when UID is not
        equal to the real user ID, making it impossible to switch back.  */
@@ -42,3 +46,4 @@ seteuid (uid_t uid)
 
   return result;
 }
+libc_hidden_def (seteuid)
index 6b9d34f038752dd3ab7afdbcc83aef524450dfe8..c4b114eb079f40a92ed2913d20b48837be56f597 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 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
@@ -46,6 +46,7 @@ setegid (gid_t gid)
 
   return result;
 }
+libc_hidden_def (setegid)
 #else
 # include <sysdeps/unix/bsd/setegid.c>
 #endif
index ba064ee1414ab7d3d5c0f91a21abe536a25c5aa1..ab9819b8f9195ed9004a48eaa42ef579e840c2a5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 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
@@ -50,6 +50,7 @@ seteuid (uid_t uid)
 
   return result;
 }
+libc_hidden_def (seteuid)
 #else
 # include <sysdeps/unix/bsd/seteuid.c>
 #endif
index 14ec1378df1edd2be2be9ecf870d40869b739ef9..11643f6d39032faf998dced77a3dfd118f1da403 100644 (file)
@@ -46,6 +46,7 @@ setegid (gid_t gid)
 
   return result;
 }
+libc_hidden_def (setegid)
 #else
 # include <sysdeps/unix/bsd/setegid.c>
 #endif
index d42a70dc29183fbc99e47e962bf58d85e9dbc533..34638ce4be841018f5d56d7dec8a1d86474cd943 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 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
@@ -50,6 +50,7 @@ seteuid (uid_t uid)
 
   return result;
 }
+libc_hidden_def (seteuid)
 #else
 # include <sysdeps/unix/bsd/seteuid.c>
 #endif