[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

> On Aug 6, 2007, at 6:43 AM, Pierangelo Masarati wrote:
>> 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.
> Ah, I was not aware of this behaviour!

I've noticed it from the sources, I don't think it was noted anywhere.

>> 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.
> Let me confirm, that I should specify "proxyattrset 0 1.1" to match
> an empty attribute list, and only an empty attribute list.  Will a
> '*' than match emptiness as well, or does it only match where there
> is some attribute specified by the client?

No: you need to specify

proxyattrset <#idx> "*"

in order to have either nothing or "*" return all attributes.  In short,
an empty attribute set and "*" are now recognized as equivalent.

You need to specify

proxyattrset <#idx> "1.1"

in order to have searches requesting "1.1", namely no attributes, be cached.

> I will work on this as soon as I am able to, although it seems this
> won't be for a couple of weeks.  I will be in touch.  Thanks again
> for your work and for your very timely response.

Right now, I'm not planning to backport this fix to re23 because it seems
to be an enhancement rather than a bugfix, and 2.4 __should be__ just
'round the corner.


Ing. Pierangelo Masarati
OpenLDAP Core Team

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