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

Re: set.regex and substring substitution



Ronie Gilberto Henrich wrote:
Hi Aaron,

Isn't it the same as setting loglevel 128 (access control list
processing) in /etc/openldap/slapd.conf ?

This is the slapd.access acl:
access to dn.regex="^(.+,)?ou=([^,]+),ou=Mail,o=example,c=BR$"
  by set.regex="user/allowedDomain & $2" write

Try

access to dn.regex="^(.+,)?ou=([^,]+),ou=Mail,o=example,c=BR$"
  by set.regex="user/allowedDomain & [$2]" write

since the domain, after regex expansion, should be treated as a literal. Moreover,

access to dn.regex="^(.+,)?ou=([^,]+),ou=Mail,o=example,c=BR$"
  by set.expand="user/allowedDomain & [$2]" write

should be more appropriate.

p.