Skip to content

Commit

Permalink
* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke
Browse files Browse the repository at this point in the history
	__sysconf only after having tried to call getgroups32.
  • Loading branch information
Ulrich Drepper committed Nov 20, 2006
1 parent 36c0a63 commit 852d657
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2006-11-18 Bruno Haible <bruno@clisp.org>

* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke
__sysconf only after having tried to call getgroups32.

2006-11-19 Ulrich Drepper <drepper@redhat.com>

* nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style
Expand Down
5 changes: 3 additions & 2 deletions sysdeps/unix/sysv/linux/i386/getgroups.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ __getgroups (int n, gid_t *groups)
}
else
{
int i, ngids;
__kernel_gid_t kernel_groups[n = MIN (n, __sysconf (_SC_NGROUPS_MAX))];
# ifdef __NR_getgroups32
if (__libc_missing_32bit_uids <= 0)
{
Expand All @@ -69,6 +67,9 @@ __getgroups (int n, gid_t *groups)
}
# endif /* __NR_getgroups32 */

int i, ngids;
__kernel_gid_t kernel_groups[n = MIN (n, __sysconf (_SC_NGROUPS_MAX))];

ngids = INLINE_SYSCALL (getgroups, 2, n, CHECK_N (kernel_groups, n));
if (n != 0 && ngids > 0)
for (i = 0; i < ngids; i++)
Expand Down

0 comments on commit 852d657

Please sign in to comment.