Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

more than 32 groups per user

0 views
Skip to first unread message

lucas vossberg

unread,
Jul 8, 1999, 3:00:00 AM7/8/99
to linux-...@vger.rutgers.edu
hi,

i 'm trying to raise the 32-groups-per-user limit in my 2.0.33 kernel
running on a single cpu pentium system.

is it a possible and safe way to raise the limit to 64 or even more by just
setting NGROUPS_MAX in include/linux/limits.h?

any help very much appreciated,

please set me on "cc" since i am not a member of this list.
thank you.
lucas

---
Lucas Vossberg
EXEDRA GBR - Internet Dienstleistungen
Ammergaustraße 72-74
D-26123 Oldenburg
Germany
Fon +49 (4 41) 984 982-7
Fax +49 (4 41) 93192-92


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

Christopher McCrory

unread,
Jul 8, 1999, 3:00:00 AM7/8/99
to linux-...@vger.rutgers.edu
Hello...


lucas vossberg wrote:
>
> hi,
>
> i 'm trying to raise the 32-groups-per-user limit in my 2.0.33 kernel
> running on a single cpu pentium system.
>
> is it a possible and safe way to raise the limit to 64 or even more by just
> setting NGROUPS_MAX in include/linux/limits.h?

Almost... (someone correct me if I am wrong)

You need to patch /PATH/linux/include/linux/limits.h and
/PATH/linux/include/ARCH/param.h
with:
-#define NGROUPS 32
+#define NGROUPS 256

Then patch glibc also with the same patch, otherwise it won't work.
With glibc2, you need the patch the sources. With glibc2.1 the
paramaters are gotten out of the running kernel (could be the kernel
source though). When both are done you should be OK. Try this on a
devel machine first!

ftp://admin.netus.com/OLD/glibc/glibc-2.0.7.NG265.patch
and
ftp://admin.netus.com/pub/hello is a quicky program to show the limits
sample:
[www@sc tmp]$ ./hello
_SC_NGROUPS_MAX 256 end
_SC_LOGIN_NAME_MAX 9 end
Num groups 78 end
I can't find the source to that right now though... :(

--

I just returned from vacation. I am catching up as fast as I can.
( I also caught a lot of fish and got a nice tan :)

Christopher McCrory
Lead Bithead, Netus Inc.
chri...@netus.com
ad...@netus.com

"Linux: Because rebooting is for adding new hardware"

Frank van Maarseveen

unread,
Jul 8, 1999, 3:00:00 AM7/8/99
to linux-...@vger.rutgers.edu
On Thu, Jul 08, 1999 at 10:45:41AM +0100, lucas vossberg wrote:
> hi,
>
> i 'm trying to raise the 32-groups-per-user limit in my 2.0.33 kernel
> running on a single cpu pentium system.
>
> is it a possible and safe way to raise the limit to 64 or even more by just
> setting NGROUPS_MAX in include/linux/limits.h?
>
> any help very much appreciated,
>
> please set me on "cc" since i am not a member of this list.
> thank you.
> lucas
We've done that on linux-2.2.10-ac8 by applying two patches (attached),
one for the linux kernel and one for glibc-2.0.7-17 (they are almost
identical). The main library problem is the function initgroups() which
appeared to use a #define for the maximum number of groups. We have only
replaced /lib/libc-2.0.7.17 for this. It would be nicer if a separate
small system call library existed, offering a user mode sysconf() for the
_SC_NGROUPS_MAX parameter (and others). It could even try to calculate
it instead of using a #define from the linux include files.

Note that when you are using NFS there is a hardcoded limit in the
underlying RPC protocol of 16 groups. The first 16 groups are passed
to the server for permission checking, the others are ignored. I've
finished a patch for 2.2.10-ac8 which maintains a dynamic group list for
RPC, assuming the server will do UNIX style permission checking. If the
NFS client is not able to pass all groups then it might as well make a
reasonable selection of which groups to pass.

We are happily running linux-2.2.10-ac8 with 256 groups, even on NFS. I'll
first finish a similar patch for linux-2.3.9 (10?) before putting it
all on the mailing list.

--
Frank

linux-ngroups.patch
glibc-2.0.7-ngroups.patch

Nick Burrett

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to Christopher McCrory
Christopher McCrory <chri...@netus.com> writes:

> Hello...


>
>
> lucas vossberg wrote:
> >
> > hi,
> >
> > i 'm trying to raise the 32-groups-per-user limit in my 2.0.33 kernel
> > running on a single cpu pentium system.
> >
> > is it a possible and safe way to raise the limit to 64 or even more by just
> > setting NGROUPS_MAX in include/linux/limits.h?
>

> Almost... (someone correct me if I am wrong)
>
> You need to patch /PATH/linux/include/linux/limits.h and
> /PATH/linux/include/ARCH/param.h
> with:
> -#define NGROUPS 32
> +#define NGROUPS 256
>
> Then patch glibc also with the same patch, otherwise it won't work.
> With glibc2, you need the patch the sources. With glibc2.1 the
> paramaters are gotten out of the running kernel (could be the kernel
> source though). When both are done you should be OK. Try this on a
> devel machine first!
>
> ftp://admin.netus.com/OLD/glibc/glibc-2.0.7.NG265.patch
> and
> ftp://admin.netus.com/pub/hello is a quicky program to show the limits
> sample:
> [www@sc tmp]$ ./hello
> _SC_NGROUPS_MAX 256 end
> _SC_LOGIN_NAME_MAX 9 end
> Num groups 78 end
> I can't find the source to that right now though... :(

You need to look out for other packages that use NGROUPS as a compile
time constant e.g. shadow-utils. You'd have to rebuild all those
packages as well.

Probably better to fix your kernel and glibc and then re-build all
packages.


Nick.

0 new messages