[SSSD] Fix proxy backend initgroups_dyn code

Simo Sorce simo at redhat.com
Wed Aug 21 17:21:52 UTC 2013


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.

-- 
Simo Sorce * Red Hat, Inc * New York
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-proxy-Allow-initgroup-to-return-NOTFOUND.patch
Type: text/x-patch
Size: 2625 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130821/19045d30/attachment.bin>


More information about the sssd-devel mailing list