diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
commit | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch) | |
tree | 2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /sysdeps/mach/hurd/getresuid.c | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip |
2.5-18.1
Diffstat (limited to 'sysdeps/mach/hurd/getresuid.c')
-rw-r--r-- | sysdeps/mach/hurd/getresuid.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/getresuid.c b/sysdeps/mach/hurd/getresuid.c index f4bfaeaf56..668e463a39 100644 --- a/sysdeps/mach/hurd/getresuid.c +++ b/sysdeps/mach/hurd/getresuid.c @@ -1,5 +1,5 @@ -/* getresuid -- fetch effective user ID, real user ID, and saved-set user ID - Copyright (C) 2002 Free Software Foundation, Inc. +/* getresuid -- fetch real user ID, effective user ID, and saved-set user 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 user ID, real user ID, and saved-set user ID, +/* Fetch the real user ID, effective 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 *ruid, uid_t *euid, uid_t *suid) { error_t err; - uid_t eff, real, saved; + uid_t real, eff, saved; HURD_CRITICAL_BEGIN; __mutex_lock (&_hurd_id.lock); @@ -42,8 +42,8 @@ __getresuid (uid_t *euid, uid_t *ruid, uid_t *suid) else { real = _hurd_id.aux.uids[0]; - saved = _hurd_id.aux.nuids < 2 ? real :_hurd_id.aux.uids[1]; eff = _hurd_id.gen.nuids < 1 ? real : _hurd_id.gen.uids[0]; + saved = _hurd_id.aux.nuids < 2 ? real : _hurd_id.aux.uids[1]; } } @@ -53,8 +53,8 @@ __getresuid (uid_t *euid, uid_t *ruid, uid_t *suid) if (err) return __hurd_fail (err); - *euid = eff; *ruid = real; + *euid = eff; *suid = saved; return 0; } |