2004-03-30 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/unix/sysv/linux/i386/setgroups.c (setgroups): Avoid
+ comparison with limit if we can rely on the syscall being available.
+
* nis/nss_nis/nis-initgroups.c: Implement getting the information
from the netid.byname map if the system administrator allows this.
* nis/Makefile (distribute): Add nss.
-/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2002, 2004 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
int
setgroups (size_t n, const gid_t *groups)
{
+#if __ASSUME_32BITUIDS > 0
+ return INLINE_SYSCALL (setgroups32, 2, n, CHECK_N (groups, n));
+#else
if (n > (size_t) __sysconf (_SC_NGROUPS_MAX))
{
__set_errno (EINVAL);
}
else
{
-#if __ASSUME_32BITUIDS > 0
- return INLINE_SYSCALL (setgroups32, 2, n, CHECK_N (groups, n));
-#else
size_t i;
__kernel_gid_t kernel_groups[n];
}
return INLINE_SYSCALL (setgroups, 2, n, CHECK_N (kernel_groups, n));
-#endif
}
+#endif
}
libc_hidden_def (setgroups)