Configurable buffer size for getpwnam() and getgrnam()

Bernhard Fischer rep.nop at aon.at
Fri Dec 8 03:28:17 PST 2006


On Fri, Dec 08, 2006 at 09:50:37AM +0100, Peter Kjellerstedt wrote:
>> On Wed, Dec 06, 2006 at 05:35:11PM +0100, Ricard Wanderlof wrote:
>> >The following patch adds a configurable buffer size for 
>> >getpwnam() and getgrnam() and friends. The default buffer 
>> >size is, as before, 256 (glibc seems to use 1024 by default).

>> >+config UCLIBC_PWD_BUFFER_SIZE
>> >+	int "Buffer size for getpwnam() and friends"
>> >+	default 256
>> 
>> Perhaps you want to add a range here, since you don't check what was
>> passed in, AFAICS.
>> 
>> >+	help
>
>What would be an appropriate range?

Without having looked at the code's requirements, i'd use range 32 65535
for a start. Would have to check if a lower bound of 6 or 8 would be
appropriate.


More information about the uClibc mailing list