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

Re: (ITS#3806) error with space in the rootdn clause

> Version: 2.3.4
> OS: linux fedora core 2

> database        config
> rootdn          "cn=Directory Manager,cn=config"

^^^ you're not supposed to use this directive in the "config" database;
the rootdn is hardcoded to be "cn=config"

> directory       /ldap/openldap/etc/openldap/slapd.d

^^^ you're not supposed to use this directive in the "config" database;
use the -F switch to provide the configuration directory location.

> database        bdb
> suffix          "o=marcel,c=fr"
> rootdn          "cn=Zobi Lamouche,o=marcel,c=fr"
> rootpw          leon
> --------Slapd return when launched twice :
> line 1 (cn=Zobi Lamouche,o=marcel,c=fr)
> olcRootDN: value #0: <olcRootDN> extra cruft after <dn> ignored
> line 1 (leon)
> olcRootPW: value #0: <olcRootPW> can only be set when rootdn is under
> suffix
> slapd stopped.

The problem occurs because DNs that contain spaces are parsed as different
tokens unless they are enclosed within quotes; if you edit
slapd.d/cn\=config/olcDatabase\=\{1\}bdb.ldif and put quotes around the
value of olcRootDN it will work.  This is a bug that affects all
occurrences of DN-valued attributes in back-config.

There might be different solutions, which should be dicussed on -devel:
- EMIT DN-valued attributes wrapped in double quotes (") e.g. by defining
a value_add_one_quoted() helper that wraps the calls to value_add_one();
- parse DN-valued attributes differently from other values, e.g. by
glueing together tokens 1 to argc-1 (this sounds like a hack, and may
cause trouble with slapd.conf parsing);
- other...


Pierangelo Masarati

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