mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
* sysdeps/unix/sysv/linux/seteuid.c (seteuid): Use setresuid32 syscall directly if possible. If __ASSUME_SETRESUID_SYSCALL is defined drop compatibility code. * sysdeps/unix/sysv/linux/setegid.c (setegid): Use setresgid32 syscall directly if possible. If __ASSUME_SETRESUID_SYSCALL is defined drop compatibility code. * sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Use setresuid32 syscall directly if possible. * sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Use setresgid32 syscall directly if possible.
This commit is contained in:
@ -44,7 +44,7 @@ __setregid (gid_t rgid, gid_t egid)
|
||||
#if __ASSUME_32BITUIDS > 0
|
||||
return INLINE_SYSCALL (setresgid32, 3, rgid, egid, -1);
|
||||
#else
|
||||
# ifdef __NR_setregid32
|
||||
# ifdef __NR_setresgid32
|
||||
if (__libc_missing_32bit_uids <= 0)
|
||||
{
|
||||
int result;
|
||||
@ -66,7 +66,13 @@ __setregid (gid_t rgid, gid_t egid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return INLINE_SYSCALL (setresgid, 3, rgid, egid, -1);
|
||||
# ifdef __NR_setresgid
|
||||
int result = INLINE_SYSCALL (setresgid, 3, rgid, egid, -1);
|
||||
# endif
|
||||
if (result == -1 && errno == ENOSYS)
|
||||
result = INLINE_SYSCALL (setregid, 2, rgid, egid);
|
||||
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
weak_alias (__setregid, setregid)
|
||||
|
Reference in New Issue
Block a user