mirror of git://sourceware.org/git/glibc.git
Update.
2003-03-26 GOTO Masanori <gotom@debian.or.jp> * sysdeps/unix/sysv/linux/i386/setfsuid.c: Use INTERNAL_SYSCALL and do not check for errors (unless testing for 32bit variant). * sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise.
This commit is contained in:
parent
359b695d23
commit
8576351599
|
|
@ -1,3 +1,9 @@
|
||||||
|
2003-03-26 GOTO Masanori <gotom@debian.or.jp>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/setfsuid.c: Use INTERNAL_SYSCALL and
|
||||||
|
do not check for errors (unless testing for 32bit variant).
|
||||||
|
* sysdeps/unix/sysv/linux/i386/setfsgid.c: Likewise.
|
||||||
|
|
||||||
2003-03-27 Philip Blundell <philb@gnu.org>
|
2003-03-27 Philip Blundell <philb@gnu.org>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET_NOERRNO): Use
|
* sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET_NOERRNO): Use
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
@ -35,27 +35,28 @@ extern int __syscall_setfsgid32 (__kernel_gid32_t);
|
||||||
# if __ASSUME_32BITUIDS == 0
|
# if __ASSUME_32BITUIDS == 0
|
||||||
/* This variable is shared with all files that need to check for 32bit
|
/* This variable is shared with all files that need to check for 32bit
|
||||||
uids. */
|
uids. */
|
||||||
extern int __libc_missing_32bit_uids;
|
extern int __libc_missing_32bit_uids attribute_hidden;
|
||||||
# endif
|
# endif
|
||||||
# endif /* __NR_setfsgid32 */
|
# endif /* __NR_setfsgid32 */
|
||||||
|
|
||||||
int
|
int
|
||||||
setfsgid (gid_t gid)
|
setfsgid (gid_t gid)
|
||||||
{
|
{
|
||||||
|
INTERNAL_SYSCALL_DECL (err);
|
||||||
# if __ASSUME_32BITUIDS > 0
|
# if __ASSUME_32BITUIDS > 0
|
||||||
return INLINE_SYSCALL (setfsgid32, 1, gid);
|
/* No error checking. */
|
||||||
|
return INTERNAL_SYSCALL (setfsuid32, err, 1, uid);
|
||||||
# else
|
# else
|
||||||
# ifdef __NR_setfsgid32
|
# ifdef __NR_setfsgid32
|
||||||
if (__libc_missing_32bit_uids <= 0)
|
if (__libc_missing_32bit_uids <= 0)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
int saved_errno = errno;
|
|
||||||
|
|
||||||
result = INLINE_SYSCALL (setfsgid32, 1, gid);
|
result = INTERNAL_SYSCALL (setfsuid32, err, 1, uid);
|
||||||
if (result == 0 || errno != ENOSYS)
|
if (! INTERNAL_SYSCALL_ERROR_P (result, err)
|
||||||
|
|| INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
__set_errno (saved_errno);
|
|
||||||
__libc_missing_32bit_uids = 1;
|
__libc_missing_32bit_uids = 1;
|
||||||
}
|
}
|
||||||
# endif /* __NR_setfsgid32 */
|
# endif /* __NR_setfsgid32 */
|
||||||
|
|
@ -65,7 +66,8 @@ setfsgid (gid_t gid)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return INLINE_SYSCALL (setfsgid, 1, gid);
|
/* No error checking. */
|
||||||
|
return INTERNAL_SYSCALL (setfsuid, err, 1, uid);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue