[PATCH] Fail gracefully if getgroups() fails

Rob Landley rob at landley.net
Tue Aug 22 23:41:20 UTC 2006


On Tuesday 22 August 2006 2:17 pm, Jordan Crouse wrote:
> uClibc is pretty stuck on using legacy 16 bit UIDs.  So when one turns off
> CONFIG_UID16 in the Linux kernel, some syscalls have the annoying tendency 
to
> return an error when they aren't normally expected to, including 
getgroups().  
> 
> The following patch makes coreutils/test.c act fail gracefully if 
getgroups() 
> returns a -1.  This fixes a problem on the One Laptop Per Child ROM image
> whereby we were getting odd Memory exhausted messages for '[' and 'test'.
> 
> Found by Mitch Bradley <wmb at firmworks.com>

Ouch.

I applied the patch (with two unrelated cleanups), it's svn 15905.  The 
correct fix is in uClibc, though.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list