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

Re: ldap backend issues (my config)

Daniel Henninger wrote:

Figured it might help to just post my config outright:
# Redirect for old LDAP base dn
database ldap
suffix "o=NCSU,c=US"
uri ldapi:///
#uri ldap://localhost/
suffixmassage "o=NCSU,c=US" "ou=people,dc=ncsu,dc=edu"
lastmod off
rewriteEngine on
rewriteContext searchResult
rewriteRule "(.*)o=NCSU,c=US$" "%1ou=people,dc=ncsu,dc=edu" ":"
rewriteContext searchAttrDN alias searchResult
rewriteContext matchedDN alias searchResult

Am I doing something stupid here?

Nothing really stupid :) I should check with the docs (and the code :) but I think you don't really need those extra rewrite stuff because the suffixmassage directive directly provides the desired behavior by default. Otherwise, you should rather use

# require that anything extra present ends with a comma; exit in case of match
rewriteRule "((.+),)?o=NCSU,c=US$" "%1ou=people,dc=ncsu,dc=edu" ":@"

but, I insist, this should be implicit in suffixmassage.

Ciao, p.

   SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497