Re: Max groups at 32?

Tim Hockin (thockin@hockin.org)
Tue, 4 Jun 2002 14:57:37 -0700 (PDT)


I screwed up sending this out - just in case it didn't go properly to the
list...

> We have a patch floating around that enables unlimited group membership at
> the kernel level, too. We've never submitted it because it was suggested
> that we were crazy and should just bugger off. If I thought it might be
> useful and acceptable, we could perhaps make it available in a cleanish
> form.
>
> How do it handle userland backwards compatibility with the existing
> stuff?

getgroups/setgroups always use a size. use sysctl() to get/set the
max ngroups value (default to 32).

It involves some little tweaks at various places, and we keep the groups
list sorted because it can now get very large. But all the kernel code is
pretty clean. Patching glibc to do the right thing was straight forward.
Then a well-done app will call sysctl() to get the ngroups, make room for
it and call getgroups().

Old apps that count on NGROUPS being constant will only get the first 32
groups. System admin can define max NGROUPS at boot time via sysctl.

I think I have accurately described it - I didn't write it, so I CC:ed
Erik, who did. It'd be super cool to get this pushed back. I haven't
been trying too hard, but I can definately spend some time prepping it, if
it has better than a snowball's chance.

Tim

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