Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Mar 2009 22:33:24 -0400
From:      Boris Kochergin <spawk@acm.poly.edu>
To:        freebsd-hackers@freebsd.org
Subject:   Doing away with NGROUPS_MAX in src/sys/sys/syslimits.h?
Message-ID:  <49C6F4F4.5030609@acm.poly.edu>

next in thread | raw e-mail | index | archive | help
Ahoy. I got bitten by this today--a system I administer for someone had 
users in more than 16 groups, so I had to bump the value, recompile the 
kernel, and reboot. It seems desirable to (at the very least) make this 
a read-only tunable that can be set using /boot/loader.conf, so as to 
avoid source modification and kernel recompilation. I had a look around, 
and noticed that NGROUPS_MAX is used to construct static arrays in a 
couple of locations ("ibcs2_gid_t iset[NGROUPS_MAX];"). It seems that 
malloc(9)/MALLOC(9) can be used to allocate memory for the array 
instead, and panic() (or something) can be called if the allocation 
fails, no? Is that about the gist of it? If I'm not overlooking 
something major, I'd like to take a stab at it.

-Boris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49C6F4F4.5030609>