Max groups one can be a member of linux/sched.h and NGROUPS_SMALL

From: Joseph Pingenot
Date: Thu Oct 28 2004 - 13:08:27 EST


Hello.

In my quest to try and figure out the max number of groups one can be a
member of (and to learn more about the kernel internals), I stumbled
across the following tidbit:

(excerpted from linux/sched.h)
#define NGROUPS_SMALL 32
#define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t)))
struct group_info {
int ngroups;
atomic_t usage;
gid_t small_block[NGROUPS_SMALL];
int nblocks;
gid_t *blocks[0];
};

This seems to be the place where group information is stored (linked to from
task_struct).

So, it appears to hold 32 gids, but what is this blocks bit? Is 32 the max
number of groups one can be a member of?

Thanks!

-Joseph

--
Joseph===============================================trelane@xxxxxxxxxxxxxx
Graduate Student in Physics, Freelance Free Software Developer
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/