[SSSD] [PATCH] USe sysdb_serch_service() in sss_cacahe

Simo Sorce simo at redhat.com
Thu Jan 10 16:13:05 UTC 2013


On Thu, 2013-01-10 at 11:06 -0500, Simo Sorce wrote:
> On Thu, 2013-01-10 at 11:22 +0100, Pavel Březina wrote:
> > On 01/08/2013 05:10 AM, Simo Sorce wrote:
> > > In the patches that fix the sdap_reinit functions I introduced a new
> > > service search helper sysdb_search_services()
> > >
> > > Use this helper in sss_cache instead of a home grown one with poor-man
> > > filter parser.
> > >
> > > Simo.
> > 
> > Hi,
> > I don't think these functions are identical.
> > 
> > -    if (strcmp(sub_filter, "*") == 0) {
> > -        /* All services */
> > -        ret = sysdb_enumservent(mem_ctx, sysdb, &res);
> > -    } else {
> > -        /* Get service by name */
> > -        ret = sysdb_getservbyname(mem_ctx, sysdb, sub_filter,
> > -                                  NULL, &res);
> > -    }
> > 
> > The sub_filter is not a valid ldb filter, but '*' or name.
> 
> Ahh true, I'll change this to be a minimal wrapper then.
> 
> Thanks for catching it.

Actually looking at is it would be more consistent to change the filter
in update_all_filters, however I noticed that all these filters only to
SYSDB_NAME=<value> and none take in account aliases, while the
getsrvbyname() function also takes in account aliases. Should the
update_all_filters also take in account aliases for other filters like
update_user_filter ?
If so I can simply change update_filter for all uniformly.

Simo.

> Btw why sss_cache is not tested in make check ?
> 
> Simo.
> 
> 
> Simo.


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




More information about the sssd-devel mailing list