> On June 13, 2016, 6:15 p.m., James Peach wrote:
> > 3rdparty/stout/include/stout/os/posix/su.hpp, line 177
> > <https://reviews.apache.org/r/47667/diff/3/?file=1417337#file1417337line177>
> >
> >     Bear in mind that ``SC_NGROUPS_MAX`` is not meaningful on Darwin other 
> > than it is the number of groups returned by ``getgroups(2)``. I don't 
> > remembee whether ``getgrouplist(3)`` gives you the fill list, but the 
> > manpage sounds promising.
> >     
> >     AFAICT this code will always truncate the list at 16.

Yeah, currently the `getgrouplist` always truncate at 16. 

I am following:
https://github.com/practicalswift/osx/blob/67cfd3a087d292368550619774c9a692cabe91a5/src/samba/samba/source/lib/system_smbd.c#L120
https://github.com/practicalswift/osx/blob/67cfd3a087d292368550619774c9a692cabe91a5/src/samba/samba/source/lib/system_smbd.c#L204~#L210
https://github.com/practicalswift/osx/blob/67cfd3a087d292368550619774c9a692cabe91a5/src/samba/samba/source/lib/system.c#L886~#L894

>From above reference, seems like the max_grp always comes from either 
>`_SC_NGROUPS_MAX ` or `NGROUPS_MAX`. I am not familiar with Darwin kernel. Do 
>you mean I should determine the `ngroups` in `getgrouplist` by calling 
>`getgroups(2)` and find the size of groups returned? Could you point me to 
>some links if I misunderstand anything?

Thanks!


- Gilbert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47667/#review137435
-----------------------------------------------------------


On June 13, 2016, 4:50 p.m., Gilbert Song wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47667/
> -----------------------------------------------------------
> 
> (Updated June 13, 2016, 4:50 p.m.)
> 
> 
> Review request for mesos, Artem Harutyunyan, Jie Yu, James Peach, Kevin 
> Klues, and Timothy Chen.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added stout functions to get and set supplementary groud ids.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/posix/su.hpp 
> 0a3f23918be9f4d0b044cd9c45001114bc36fce5 
> 
> Diff: https://reviews.apache.org/r/47667/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Gilbert Song
> 
>

Reply via email to