[SSSD] [PATCH] Fix saving empty LDAP groups

Simo Sorce simo at redhat.com
Fri Nov 16 13:35:56 UTC 2012


On Fri, 2012-11-16 at 12:22 +0100, Pavel Březina wrote:
> On 11/16/2012 12:06 PM, Jakub Hrozek wrote:
> > On Thu, Nov 15, 2012 at 12:55:37PM +0100, Jakub Hrozek wrote:
> >> On Thu, Nov 15, 2012 at 10:57:37AM +0100, Jakub Hrozek wrote:
> >>> We broke saving nested LDAP groups with no members in 1.9 during the
> >>> conversion to ghost users. The attached patches fix that.
> >>>
> >>> The first three patches would be nice to get into 1.9, the last patch is
> >>> OK in master only. I just found the code hard to read sometimes so I
> >>> split it into a separate functions and used more descriptive variable
> >>> names. I also think that the branch that the branch that re-read
> >>> SDAP_AT_GROUP_MEMBER after reading SYSDB_GHOST is not needed.
> >>
> >> Sorry, self-nack. Changing the conditin was not quite correct in patch
> >> #2. New set is attached.
> >
> > I changed the condition but managed to send patches with the wrong
> > one..correct set is attached.
> 
> #1 Ack
> #2 Ack
> #3 and #4 Nack
> > -        el->values = talloc_realloc(attrs, el->values, struct ldb_val,
> > +        el->values = talloc_realloc(group_attrs, el->values, struct ldb_val,
> >                                      cnt);
> 
> I think el should be used as talloc context instead of group_attrs
> (ghostel in #4).

No, el is not a talloc_context, it is an element in an array so you
can't use it. The code above is correct.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York




More information about the sssd-devel mailing list