This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2329] [rs]etres[gu]id have misordered arguments
- From: "tschwinge at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 15 Feb 2006 20:22:11 -0000
- Subject: [Bug libc/2329] [rs]etres[gu]id have misordered arguments
- References: <20060212123345.2329.samuel.thibault@ens-lyon.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From tschwinge at gnu dot org 2006-02-15 20:22 -------
(In reply to comment #5)
> Do you have a small testcase to demonstrate the problem?
Just have a look at the corresponding Linux code, which is where these functions
come from as I understand it.
[glibc]/sysdeps/unix/sysv/linux/i386/getresuid.c
#v+
[...]
int
__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
{
# if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (getresuid32, 3, CHECK_1 (ruid),
CHECK_1 (euid), CHECK_1 (suid));
# else
[...]
result = INLINE_SYSCALL (getresuid, 3, __ptrvalue (&k_ruid),
__ptrvalue (&k_euid), __ptrvalue (&k_suid));
if (result == 0)
{
*ruid = (uid_t) k_ruid;
*euid = (uid_t) k_euid;
*suid = (uid_t) k_suid;
}
return result;
# endif
}
[...]
#v-
The syscall looks like this:
[linux]/kernel/sys.c
#v+
[...]
asmlinkage long sys_getresuid(uid_t __user *ruid, uid_t __user *euid, uid_t
__user *suid)
{
int retval;
if (!(retval = put_user(current->uid, ruid)) &&
!(retval = put_user(current->euid, euid)))
retval = put_user(current->suid, suid);
return retval;
}
[...]
#v-
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2329
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.