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

Re: slaptest conversion of acl regex'es drops backslashes (correct resubmission 2)



Nick Milas wrote:
On 5/6/2012 5:51 ÎÎ, Nick Milas wrote:

becomes:
     olcAccess: {xx}to
dn.regex="^dc=\b\d{1,3}\.\d{1,3}\.\d{1,3}\b\.in-addr\.arpa,ou=dns,dc=example,dc=com$"
by group/groupOfNames

In the end, I might manage to send the *actual* converted regex :( :

      access to
dn.regex="^dc=\b\d{1,3}\.\d{1,3}\.\d{1,3}\b\.in-addr\.arpa,ou=dns,dc=example,dc=com$"
      by group.exact="cn=Admins,ou=Groups,dc=example,dc=com" write
becomes:
      to
dn.regex="^dc=bd{1,3}.d{1,3}.d{1,3}b.in-addr.arpa,ou=dns,dc=example,dc=com$"
by group/groupOfNames/member.exact="cn=admins,ou=groups,dc=noa,dc=gr" write

Please advise.

What you've posted is expected behavior. The single backslashes were parsed by the slapd.conf parser. To actually get them into the regex you need to escape those backslashes as well. This is already documented in slapd.conf(5) and in the Admin Guide.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/