reinhold.may@gmx.de wrote:
Pierangelo,
First of all: Sorry, I've left in fact a paragraph in my .ldif example that should have come out.
I can reproduce what you've said and using the following code:
#include <ldap.h> #include <stdio.h>
int main() { char **c = ldap_explode_dn( "cn=With/Slash,ou=My address book,dc=somedomain,dc=org", 1);
int i; for (i = 0; c[i] != 0; i++) { printf("%s\n", c[i]); }
return 0; }
which correctly produces:
cn=With/Slash ou=My address book dc=somedomain dc=org
And executing:
# slapdn "cn=With/Slash,ou=My address book,dc=somedomain,dc=org"
produces the expected:
DN: <cn=With/Slash,ou=My address book,dc=somedomain,dc=org> check succeeded normalized: <cn=with/slash,ou=my address book,dc=somedomain,dc=org> pretty: <cn=With/Slash,ou=My address book,dc=somedomain,dc=org>
However, running the actual example produces the following full output:
$ ldapadd -x -D 'cn=root,dc=somedomain,dc=org' -W -f test.ldif Enter LDAP Password: adding new entry "dc=somedomain,dc=org"
adding new entry "ou=My address book,dc=somedomain,dc=org"
adding new entry "cn=With/Slash,ou=My address book,dc=somedomain,dc=org" ldap_add: No such object (32) additional info: Parent does not exist
which is erroneous.
Just to check that it is the forward slash that must be to blame, here's the full output of the counter check:
$ ldapadd -x -D 'cn=root,dc=somedomain,dc=org' -W -f test2.ldif Enter LDAP Password: adding new entry "dc=somedomain,dc=org"
adding new entry "ou=My address book,dc=somedomain,dc=org"
adding new entry "cn=WithoutSlash,ou=My address book,dc=somedomain,dc=org"
So, I still suspect a bug...
This output is not useful. First of all, can you tell what ldapadd you're using? Please make sure you run the version of ldapadd that comes with OpenLDAP sources you built. Second, please provide an indication of what happens at the server side. Logs at "stats,trace" would be helpful. I can confirm that I can successfully add an entry whose RDN contains a slash "/" to OpenLDAP 2.3.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------