Subject: Re: bin/14172
To: Klaus Klein <kleink@reziprozitaet.de>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 12/05/2002 00:15:26
> Actually, making kern.ngroups writable for that purpose would seem
> an intuitive choice of interface to me.  But for the implementation ...

Yes - that would (reasonably trivially) implement updating the
'constant' and having sysconf and sysctl both return it.
 
> .. is there really a demand for an 'unlimited' NGROUPS_MAX?  With the
> present data structure, even a run-time changeable limit could be
> messy to implement.  Wouldn't kernel compile-time be sufficient for
> most purposes (possibly combined with bumping the limit)?

It starts getting wasteful on kernel memory.  Anyone who is
hitting the current limit (and people are), would probably
start hitting larger limits as well.  Recompiling the kernel
is IMHO a cheat way of solving these sort of problems.
The code changes are not that complex, mainly adding 'ngroups'
to some of the internal functions.

> Do you have something specific in mind, here?  Supporting and using
> POSIX variables in sysconf is fine/encouraged/expected, of course, but
> adding a sysconf knob for every NetBSD-specific sysctl variable isn't
> possible (think of sysconf's signature) nor would enhance
> 'portability' in any way.

I wouldn't extend sysconf - you will dig yourself into a portability
hole.

	David

-- 
David Laight: david@l8s.co.uk