mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Song <songzihao1...@gmail.com>
Subject Re: Review Request 47667: Added stout functions to get and set supplementary groud ids.
Date Tue, 14 Jun 2016 18:09:50 GMT


> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message