[SSSD] Fix proxy backend initgroups_dyn code

Jakub Hrozek jhrozek at redhat.com
Wed Nov 20 14:59:57 UTC 2013


On Thu, Aug 22, 2013 at 08:01:23PM +0200, Jakub Hrozek wrote:
> On Wed, Aug 21, 2013 at 01:21:52PM -0400, Simo Sorce wrote:
> > On Wed, 2013-08-21 at 13:05 -0400, Simo Sorce wrote:
> > > On Wed, 2013-08-21 at 12:39 -0400, Stephen Gallagher wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > > 
> > > > On Wed 21 Aug 2013 11:50:56 AM EDT, Simo Sorce wrote:
> > > > > Tested fix for #2051 and seem to work.
> > > > > 
> > > > > However it just occurred to me we may always want to check if
> > > > > pwd.pw_gid is listed in the gids returned and add it if not ?
> > > > > 
> > > > 
> > > > SSSDBG_CONF_SETTINGS doesn't seem like the right level to me.
> > > > SSSDBG_FUNC_DATA or SSSDBG_TRACE_FUNC seems more appropriate.
> > > 
> > > It turns out I just copied the same level of the following switch case,
> > > but I just now realized that is just informational.
> > > 
> > > I'll change this after lunch.
> > 
> > I decided to change the approach slightly, as it occurred to me the
> > proxy module uses this call as a way to refresh all groups, so it should
> > try to refresh the primary group too.
> > 
> > If the group does not exist no harm is done as get_gr_gid will simply
> > skip not found groups (and tries to delete them).
> > 
> > However I found out that there was a missing error check in get_gr_gid
> > so I added the fix to this patch for completeness.
> > 
> > Simo.
> 
> Pushed to master and sssd-1-10

Also pushed to sssd-1-9 as it's a dependency for another fix.



More information about the sssd-devel mailing list