glibc and getgrouplist

Roland Illig roland.illig at gmx.de
Fri Jul 22 13:46:45 UTC 2005


Leonard den Ottolander wrote:
> On Fri, 2005-07-22 at 15:00, Pavel Tsekov wrote:
> 
>>Roland's patch looks good and it is pretty straight-forward. I vote for
>>its inclusion in PRE.
> 
> And totally untested.

I have tested it on NetBSD/i386. The "normal" case works well, and I 
have also simulated the situation when getgroups() should return -1. The 
effect is that the return value will never be 1 in that case.

But as the only possible failures are EFAULT (wrong address) and EINVAL 
(ngroups out of range) on Linux, Solaris and NetBSD (and probably most 
others), this should not occur anyway.

Roland



More information about the mc-devel mailing list