diff options
Diffstat (limited to 'usr/src/uts/common/conf/param.c')
| -rw-r--r-- | usr/src/uts/common/conf/param.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/src/uts/common/conf/param.c b/usr/src/uts/common/conf/param.c index ac5d99a76f..e6d77020a6 100644 --- a/usr/src/uts/common/conf/param.c +++ b/usr/src/uts/common/conf/param.c @@ -713,8 +713,17 @@ param_check(void) physmem = original_physmem; } #endif - if (ngroups_max < NGROUPS_UMIN || ngroups_max > NGROUPS_UMAX) - ngroups_max = NGROUPS_MAX_DEFAULT; + if (ngroups_max < NGROUPS_UMIN) + ngroups_max = NGROUPS_UMIN; + if (ngroups_max > NGROUPS_UMAX) + ngroups_max = NGROUPS_UMAX; + + /* If we have many groups then the ucred proto message also grows. */ + if (ngroups_max > NGROUPS_OLDMAX && + strctlsz < (ngroups_max - NGROUPS_OLDMAX) * sizeof (gid_t) + 1024) { + strctlsz = (ngroups_max - NGROUPS_OLDMAX) * sizeof (gid_t) + + 1024; + } if (autoup <= 0) { autoup = DEFAULT_AUTOUP; |
