[SSSD] [PATCH] Add user and group search LDAP filter options

Jan Zeleny jzeleny at redhat.com
Fri Apr 15 12:56:35 UTC 2011


Jakub Hrozek <jhrozek at redhat.com> wrote:
> On 04/14/2011 08:04 PM, Stephen Gallagher wrote:
> > On 04/06/2011 11:44 AM, Jakub Hrozek wrote:
> >> On 04/06/2011 12:40 PM, Jakub Hrozek wrote:
> >>> On 04/06/2011 08:58 AM, Jan Zelený wrote:
> >>>> Ack
> >>>> 
> >>>> Jan
> >>> 
> >>> Self nack, this needs documentation, too.
> >> 
> >> att.
> > 
> > Nack. I don't like the design of the sdap_get_id_specific_filter()
> > function at all.
> > 
> > The assumption of the inputs should be that base_filter is always a
> > complete filter (including parentheses). If there is an extra_filter, it
> > should be handled thusly:
> > 
> > If it starts with a parenthesis,
> > 
> > filter = talloc_asprintf(mem_ctx, "(&%s%s), base_filter, extra_filter)
> > 
> > If it does not,
> > filter = talloc_asprintf(mem_ctx, "(&%s(%s)), base_filter, extra_filter)
> > 
> > If there is no extra_filter, it should just talloc_strdup() the
> > base_filter and return that (since the parent function is always
> > expecting the return value to be allocated freshly on mem_ctx).
> > 
> > The advantage to this approach is that it won't require any special
> > hoops to jump through if base_filter happened to include something OTHER
> > than an '&' grouping.
> 
> Thank you, it is indeed quite cleaner. A new patch is attached.

Changes viewed by interdiff look ok, ack.

Jan



More information about the sssd-devel mailing list