[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5074) slapo-pcache's proxyattrset does not recognize "1.1" to describe an empty attribute set



zep-openldap-software@ni.enate.org wrote:

> For an application which specifies LDAP_NO_ATTRS to the attributes parameter of
> ldap_search_st(), it seems not possible to cache its results using
> slapo-pcache.
> 
> It would be great to be able to define within "overlay pcache", something like:
> 
> proxyattrset 0 (1.1)
> 
> or, simply
> 
> proxyattrset 0
> 
> Which would match queries which provide LDAP_NO_ATTRS.  This would allow the
> ability to cache responses for routines which are interested only in the
> presence of a result set, but not in the contents of that set, without the
> additional overhead of trasnferring the result.

I believe there's something odd in pcache's current behavior.  In fact, 
right now "proxyattrset 0" is already a valid directive, but it implies 
"proxyattrset 0 *", which means all attributes.  Unfortunately, this 
seems to only work if no attribute is requested, while it fails if a "*" 
is explicitly requested.

I've modified the propxycache code in HEAD so that a "1.1" can only 
explicitly appear in a list if it's the only string.  An empty attribute 
set is no longer valid, to avoid confusion about the meaning of 
non-explicit attribute sets.  A "*" or a "+" can explicitly appear in a 
proxyattrset statement, resulting in the expected behavior.  Use both to 
indicate that all attributes are in the set.

Please test.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------