[Date Prev][Date Next]
Re: can't get back_meta/rewrite working
> Hi, i'll rephrase my problem
> having three working bdb databases:
> each with an ou=A,dc=$client
> and i want to create a read-only virtual ou=A, to look like:
> backend meta
> database meta
> rewriteEngine on
> rewriteContext default
> rewriteRule "(.*)dc=client1,ou=A$" "%1ou=A,dc=client1"
> rewriteRule "(.*)dc=client2,ou=A$" "%1ou=A,dc=client2"
> rewriteRule "(.*)dc=client3,ou=A$" "%1ou=A,dc=client3"
> access to *
> by * read
> what am i doing wrong?
Did you read back-meta's man page (slapd-meta(5)) with respect to DN
rewriting? Rewrite rules are target-specific, while you appear to put all
of them before any target specification; moreover, in the above rule,
you're mapping everything from "dc=.*,ou=A" to "ou=A,dc=.*", which is fine
for ther search base; but then you'll need to rewrite "ou=A,dc=.*" back to
"dc=.*,ou=A", which you're not doing right now. Your problem is so
trivial that you could obtain the desired result by simply using the
"suffixmassage" directive inside each target specification, instead of
explicitly writing the rules.
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497