ldapmodify modrdn has problems with newrdn if it contains spaces

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
13 years ago
13 years ago

People

(Reporter: richm, Assigned: mcs)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
 
(Reporter)

Comment 1

13 years ago
dn: uid=scarter, ou=people, dc=example, dc=com
changetype: modrdn
newrdn: uid=sam carter
deleteoldrdn: 1

newrdn: uid=sam carterdn: uid=scarter, ou=people, dc=example, dc=com
ldap_rename: No such object
ldap_rename: matched: ou=people,dc=example,dc=com

# tail ../../slapd-marcus/logs/access
[13/Mar/2006:11:49:44 -0800] conn=27 op=0 RESULT err=0 tag=97 nentries=0 etime=0
dn="cn=directory manager"
[13/Mar/2006:11:49:58 -0800] conn=27 op=1 UNBIND
[13/Mar/2006:11:49:58 -0800] conn=27 op=1 fd=74 closed - U1
[13/Mar/2006:11:50:09 -0800] conn=28 fd=74 slot=74 connection from 127.0.0.1 to
127.0.0.1
[13/Mar/2006:11:50:09 -0800] conn=28 op=0 BIND dn="cn=directory manager"
method=128 version=3
[13/Mar/2006:11:50:09 -0800] conn=28 op=0 RESULT err=0 tag=97 nentries=0 etime=0
dn="cn=directory manager"
[13/Mar/2006:11:50:18 -0800] conn=28 op=1 MODRDN dn="uid=scarter, ou=people,
dc=example, dc=com\0dchangetype: modrdn\0dnewrdn: uid=sam carterdn: uid=scarter,
ou=people, dc=example, dc=com" newrdn="uid=sam carter" newsuperior="(null)"
[13/Mar/2006:11:50:18 -0800] conn=28 op=1 RESULT err=32 tag=109 nentries=0 etime=0
[13/Mar/2006:11:50:18 -0800] conn=28 op=2 UNBIND
[13/Mar/2006:11:50:18 -0800] conn=28 op=2 fd=74 closed - U1


BUT, if you were to remove the space from the modrdn it seems to work

[]# ./ldapmodify -p 9389 -D "cn=directory manager" -w secret12
dn: uid=scarter, ou=people, dc=example, dc=com
changetype: modrdn
newrdn: uid=samcarter
deleteoldrdn: 1

modifying RDN of entry uid=scarter, ou=people, dc=example, dc=com




[]# tail ../../slapd-marcus/logs/access
[13/Mar/2006:11:54:29 -0800] conn=29 fd=74 slot=74 connection from 127.0.0.1 to
127.0.0.1
[13/Mar/2006:11:54:29 -0800] conn=29 op=0 BIND dn="cn=directory manager"
method=128 version=3
[13/Mar/2006:11:54:29 -0800] conn=29 op=0 RESULT err=0 tag=97 nentries=0 etime=0
dn="cn=directory manager"
[13/Mar/2006:11:54:41 -0800] conn=29 op=1 UNBIND
[13/Mar/2006:11:54:41 -0800] conn=29 op=1 fd=74 closed - U1
[13/Mar/2006:11:55:00 -0800] conn=30 fd=74 slot=74 connection from 127.0.0.1 to
127.0.0.1
[13/Mar/2006:11:55:00 -0800] conn=30 op=0 BIND dn="cn=directory manager"
method=128 version=3
[13/Mar/2006:11:55:00 -0800] conn=30 op=0 RESULT err=0 tag=97 nentries=0 etime=0
dn="cn=directory manager"
[13/Mar/2006:11:55:46 -0800] conn=30 op=1 MODRDN dn="uid=scarter, ou=people,
dc=example, dc=com" newrdn="uid=samcarter" newsuperior="(null)"
[13/Mar/2006:11:55:46 -0800] conn=30 op=1 RESULT err=0 tag=109 nentries=0 etime=0

(Assignee)

Comment 2

13 years ago
Strange.  The sample input and DS log you posted seems to have inconsistent end of line characters... is that unrelated to this bug?
(Reporter)

Comment 3

13 years ago
It appears that those strange EOL chars are being added by ldapmodify.
(Reporter)

Comment 4

13 years ago
Hmm - I cannot reproduce this.  I tried it with Fedora DS 1.0.2 which includes ldapcsdk 5.17.  This is what I did:
I first loaded Example.ldif.
cd shared/bin
./ldapmodify -v -d 1 -D "cn=directory manager" -w password
... lots of output ...
dn: uid=scarter, ou=people, dc=example, dc=com
changetype: modrdn
newrdn: uid=sam carter
deleteoldrdn: 1

new RDN: uid=sam carter (do not keep existing values)
modifying RDN of entry uid=scarter, ou=people, dc=example, dc=com
.... lots of output ....
rename completed

On the server, this is what I see in the log:
[11/May/2006:09:19:48 -0600] conn=6 op=1 MODRDN dn="uid=scarter, ou=people, dc=example, dc=com" newrdn="uid=sam carter" newsuperior="(null)"
[11/May/2006:09:19:48 -0600] conn=6 op=1 RESULT err=0 tag=109 nentries=0 etime=0
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.