Viktor Dukhovni:
> On Fri, Feb 05, 2021 at 02:37:18PM -0500, Wietse Venema wrote:
> 
> > > The feature to conditionally suppress case folding for some LDAP maps
> > > has not been implemented.  Care to contribute a patch?
> > > 
> > >     src/global/dict_ldap.c
> > 
> > Should not this be controlled one level up, in the maps_finmd() layer?
> 
> I've not looked to closely at the layering lately, but I do think that
> the control to enable/disable lookup key folding for LDAP should be
> per-map.  Whether that's at the LDAP driver layer (via the LDAP map
> properties) or some higher layer syntax is not completely clear.
> 
> For example, with pipemap:{...} is case folding a feature of the
> pipeline as a whole, or each stage?  What configuration syntax
> is available to tweak such properties outside the table driver?

Case folding and partial keys are decided at the layer
of virtual_alias_maps etc., and that is passed down.

> My naive thought was "dict_ldap_open" could participate in setting
> the appropriate external flags as part of constructing the table.

That would not work as virtual_alias_maps etc., decide that case
folding and partial keys will be used based on the flags that a
table lookup mechanism exposes. Those flags describe basic capabilities
of hash.:, pcre:, and so on, and they must not change.

This how why hash: tables are queried with casefolded keys and with
partial keys, while pcre: tables see the full unfolded query only.

> But perhaps this could be done entirely outside the table driver
> in the middle layers.  That would be more general, if there's
> some reasonable way to do that.

Support for virtual_alias_maps etc. search order is underway, and
it is a property of virtual_alias_maps. The search order is not a
property of the maps that virtual_alias_maps etc. read from.

For the same reason, casefolding should be expressed at the level
of virtual_alias_maps etc., not a property of the maps that
virtual_alias_maps etc. read from.

        Wietse

Reply via email to