about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/getresgid.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-02-21 02:30:10 +0000
committerRoland McGrath <roland@gnu.org>2006-02-21 02:30:10 +0000
commit0d5cb2c74f3df8253834274843b4eb8cdc5dd651 (patch)
tree2fe51864d69ef66f0490d39c89729303bf584821 /sysdeps/mach/hurd/getresgid.c
parent0ca3379de12f639ccaedaf145871f6d4cfaa73b4 (diff)
downloadglibc-0d5cb2c74f3df8253834274843b4eb8cdc5dd651.tar.gz
glibc-0d5cb2c74f3df8253834274843b4eb8cdc5dd651.tar.xz
glibc-0d5cb2c74f3df8253834274843b4eb8cdc5dd651.zip
[BZ #2329]
2006-02-20  Roland McGrath  <roland@redhat.com>
	* sysdeps/mips: Directory removed, saved in ports repository.
	* sysdeps/unix/mips: Likewise.
	* sysdeps/unix/sysv/linux/mips: Likewise.
	* sysdeps/mach/mips: Likewise.
	* sysdeps/mach/hurd/mips: Likewise.
	* shlib-versions: Remove mips matches, now in ports fragment.
	* sysdeps/unix/sysv/linux/kernel-features.h: Likewise.
	* configure.in (machine): Likewise.
	* configure: Regenerated.
2006-02-15  Thomas Schwinge  <tschwinge@gnu.org>

	[BZ #2329]
	* include/unistd.h (__getresuid, __getresgid, __setresuid)
	(__setresgid): Fix argument name order in prototypes.
	* posix/unistd.h (getresuid, getresgid, setresuid, setresgid):
	Likewise.
	* posix/getresuid.c (__getresuid): Fix argument order in definition.
	* posix/getresgid.c (__getresgid): Likewise.
	* posix/setresuid.c (__setresuid): Likewise.
	* posix/setresgid.c (__setresgid): Likewise.
	* sysdeps/mach/hurd/getresuid.c (__getresuid): Likewise.
	* sysdeps/mach/hurd/getresgid.c (__getresgid): Likewise.
	* sysdeps/mach/hurd/setresuid.c (__setresuid): Likewise.
	* sysdeps/mach/hurd/setresgid.c (__setresgid): Likewise.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
Diffstat (limited to 'sysdeps/mach/hurd/getresgid.c')
-rw-r--r--sysdeps/mach/hurd/getresgid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/getresgid.c b/sysdeps/mach/hurd/getresgid.c
index a96aa49369..7847d213c4 100644
--- a/sysdeps/mach/hurd/getresgid.c
+++ b/sysdeps/mach/hurd/getresgid.c
@@ -1,5 +1,5 @@
-/* getresgid -- fetch effective group ID, real group ID, and saved-set group ID
-   Copyright (C) 2002 Free Software Foundation, Inc.
+/* getresgid -- fetch real group ID, effective group ID, and saved-set group ID
+   Copyright (C) 2002, 2006 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
@@ -22,13 +22,13 @@
 #include <hurd.h>
 #include <hurd/id.h>
 
-/* Fetch the effective group ID, real group ID, and saved-set group ID,
+/* Fetch the real group ID, effective 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 *rgid, gid_t *egid, gid_t *sgid)
 {
   error_t err;
-  gid_t eff, real, saved;
+  gid_t real, eff, saved;
 
   HURD_CRITICAL_BEGIN;
   __mutex_lock (&_hurd_id.lock);
@@ -42,8 +42,8 @@ __getresgid (gid_t *egid, gid_t *rgid, gid_t *sgid)
       else
 	{
 	  real = _hurd_id.aux.gids[0];
-	  saved = _hurd_id.aux.ngids < 2 ? real :_hurd_id.aux.gids[1];
 	  eff = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
+	  saved = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
 	}
     }
 
@@ -53,8 +53,8 @@ __getresgid (gid_t *egid, gid_t *rgid, gid_t *sgid)
   if (err)
     return __hurd_fail (err);
 
-  *egid = eff;
   *rgid = real;
+  *egid = eff;
   *sgid = saved;
   return 0;
 }