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

Re: slapo-dynlist improvement

Emmanuel Dreyfus wrote:

I'd like to use the slapo-dynlist overlay, to generate an automatically
updated list of attributes onan object. My problem is that I want the
attribute name to be different than the original:

I have

dn: cn=list,o=home
objectClass: groupOfURLs
cn: list
memberURL: ldap:///o=home?foo?sub?(objectClass=fooClass)

In slapd.conf:
overlay         dynlist
dynlist-attrset groupOfURLs memberURL

A search on cn=list,o=home gives me:
dn: cn=list,o=home
objectClass: groupOfURLs
cn: list
foo: value1
foo: value2
foo; value3

But I would like it to be displayed that way:
dn: cn=list,o=home
objectClass: groupOfURLs
cn: list
bar: value1
bar: value2
bar; value3

It seems this is not possible with current software (please correct me
if I'm wrong). I propose a contribution to slapo-dynlist, to include
attribute name remapping capability. In the config file, this qould be
configured by extending the member-ad parameter:

overlay         dynlist
dynlist-attrset groupOfURLs memberURL foo:bar

Of course, for backward compatibility, dynlist-attrset groupOfURLs memberURL foo
would still be equivalent to dynlist-attrset groupOfURLs memberURL foo:dn

The modification you propose could make sense, but I believe it could be more general if more than one attribute could be mapped. The behavior in case an optional arg#3 is added to the dynlist-attrset statement should be viewed as something different: it is basically intended to make slapo-dynlist implement dynamic groups, that's why it expands to the dn. To obtain what you mean, the syntax should rather be something like

dynlist-attrset groupOfURLs memberURL [foo:]bar [...]

where if [foo:] is absent, [dn:] is used instead. Any further attribute pair, if present, would be mapped as well.

I suggest you file an ITS for this proposed enhancement.


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