[PATCH] Fix setuid
Jakub Jelinek
jakub@redhat.com
Sat Sep 25 00:06:00 GMT 2004
Hi!
If __ASSUME_32BITUIDS == 0, but __NR_setuid32 is defined (e.g. when
configuring --enable-kernel=2.2.5 glibc with recent (where recent is not 7
years old) kernel headers), setuid will return failure even when it
succeeds.
The problem is there are two int result; decls, one at function's scope,
one in the if (__libc_missing_32bit_uids <= 0) block.
2004-09-25 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second
result declaration.
--- libc/sysdeps/unix/sysv/linux/i386/setuid.c.jj 2004-09-20 15:35:10.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/i386/setuid.c 2004-09-25 02:01:05.334225542 +0200
@@ -47,7 +47,6 @@ __setuid (uid_t uid)
# ifdef __NR_setuid32
if (__libc_missing_32bit_uids <= 0)
{
- int result;
int saved_errno = errno;
result = INLINE_SYSCALL (setuid32, 1, uid);
Jakub
More information about the Libc-hacker
mailing list