Hi Samuel,


>> I am not sure about the extreme cases of n == 0
>>
>
> n==0 should be fine, we'd just keep the egid alone.
>

Thanks.


>> and if n +1 overflows.
>>
>
> You can return EINVAL in that case.
>

Is this even something to care about in the first place ? For valid input it 
should be impossible to allocate a gid_t array this large because the number 
bytes needed will already overflow.

>> Is setgroups the only libc function that has the problem?
>>
>
> Mmmm. On GNU/Hurd only we define the equivalent seteuids for uids, I
> would say that we would want to have the same behavior, that will be
> less surprising to programmers.
>

Does seteuids have the same semantic to only change "supplementary uids"? The 
comment says it sets uids for the "current user" so I would assume it also does 
not change the current euid.
There is also a slight inconsistency that for setgroups the amount is size_t 
while for geteuids it is int.
I tried to use just like setgroups and it always fails with EMIG_BAD_ARGUMENTS. 
Am I doing something wrong?
Y.

Reply via email to