about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-12-21 17:43:59 +0000
committerMiles Bader <miles@gnu.org>1995-12-21 17:43:59 +0000
commit567676ff8165fb4a222eab681a789ace6c5f4fbb (patch)
treec252a5e063930660c42f4ce380b7a0cfaeefe043
parent8ef76445e88079b80d9684e8069e06d1378bcc68 (diff)
downloadglibc-567676ff8165fb4a222eab681a789ace6c5f4fbb.tar.gz
glibc-567676ff8165fb4a222eab681a789ace6c5f4fbb.tar.xz
glibc-567676ff8165fb4a222eab681a789ace6c5f4fbb.zip
(__setuid): Actually add the new uid instead of putting it (and other uids) in the gids and leaving the old uids as is. cvs/libc-951221
-rw-r--r--sysdeps/mach/hurd/setuid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/setuid.c b/sysdeps/mach/hurd/setuid.c
index 4e6fcc2c0a..70d5ba4456 100644
--- a/sysdeps/mach/hurd/setuid.c
+++ b/sysdeps/mach/hurd/setuid.c
@@ -50,15 +50,15 @@ DEFUN(__setuid, (uid), uid_t uid)
       memcpy (&newgen[1], _hurd_id.gen.uids,
 	      _hurd_id.gen.nuids * sizeof (uid_t));
       newaux[0] = uid;
-      memcpy (&newaux[1], _hurd_id.aux.uids,
+      memcpy (&newaux[1], _hurd_id.aux.uids + 1,
 	      (_hurd_id.aux.nuids - 1) * sizeof (uid_t));
 
       err = __USEPORT (AUTH, __auth_makeauth
 		       (port, NULL, MACH_MSG_TYPE_COPY_SEND, 0,
-			_hurd_id.gen.uids, _hurd_id.gen.nuids,
-			_hurd_id.aux.uids, _hurd_id.aux.nuids,
 			newgen, 1 + _hurd_id.gen.nuids,
 			newaux, _hurd_id.aux.nuids,
+			_hurd_id.gen.gids, _hurd_id.gen.ngids,
+			_hurd_id.aux.gids, _hurd_id.aux.ngids,
 			&newauth));
     }
   __mutex_unlock (&_hurd_id.lock);