Don't inforce an upper bound on kern.ngroups. The INT_MAX-1 limit was

too high due to several overflows.  The actual limit is somewhere in the
neighborhood of INT_MAX/4 on 64-bit machines, but most systems could not
support such a limit due to a lack of memory and the cost of duplicate
credentials.

Reported by:	bde
This commit is contained in:
Brooks Davis 2010-02-24 15:52:18 +00:00
parent 774ee54045
commit 2e5514defa

View File

@ -240,8 +240,6 @@ init_param1(void)
TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max);
if (ngroups_max < NGROUPS_MAX)
ngroups_max = NGROUPS_MAX;
if (ngroups_max > INT_MAX - 1)
ngroups_max = INT_MAX - 1;
}
/*