Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2001-03-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): getgroups32
	syscall checks for negative n so don't test here as well.
  • Loading branch information
Ulrich Drepper committed Mar 25, 2001
1 parent 0a45b76 commit 5e31149
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-03-25 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): getgroups32
syscall checks for negative n so don't test here as well.

2001-03-23 Jes Sorensen <jes@linuxcare.com>

* sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ...
Expand Down
12 changes: 6 additions & 6 deletions sysdeps/unix/sysv/linux/i386/getgroups.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1997, 1998, 2000, 2001 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
Expand Down Expand Up @@ -45,16 +45,16 @@ extern int __libc_missing_32bit_uids;
int
__getgroups (int n, gid_t *groups)
{
if (n < 0)
#if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (getgroups32, 2, n, CHECK_N (groups, n));
#else
if (__builtin_expect (n, 1) < 0)
{
__set_errno (EINVAL);
return -1;
}
else
{
#if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (getgroups32, 2, n, CHECK_N (groups, n));
#else
int i, ngids;
__kernel_gid_t kernel_groups[n = MIN (n, __sysconf (_SC_NGROUPS_MAX))];
# ifdef __NR_getgroups32
Expand All @@ -77,8 +77,8 @@ __getgroups (int n, gid_t *groups)
for (i = 0; i < ngids; i++)
(__ptrvalue (groups))[i] = kernel_groups[i];
return ngids;
#endif
}
#endif
}

weak_alias (__getgroups, getgroups)

0 comments on commit 5e31149

Please sign in to comment.