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

Re: Problem when using ldap_rename_s (ITS#1184)



On Thursday 05 July 2001 15:52, you wrote:
> > Full_Name: Grahame Bowland
> >
> > If I have an entry in my LDAP directory with a distinguished name:
> >   cn=Grahame Bowland + uid=433@pos.publishing, ou=University
> > Communications Services, o=The University of Western Australia
> >
> > And then call ldap_rename_s(thatdn, "cn=Grahame Bowland (deleted)",
>
> "ou=Deleted
>
> > Entries, o=The University of Western Australia", 1)
> > You get back an error "Modify: delete value failed."
> >
> > However, parsing the RDN, passing 0 as the last argument to ldap_rename_s
> > so that it doesn't try to remove the attributes and then removing the
> > attribute values after the rename does work.
>
> That's because slapd tries to delete the rdn attribute 'cn' of value
> 'Grahame Bowland + uid=433@pos.publishing', which of course doesn't
> exist. In this case you should not require automatic attr deletion but
> provide by hand. On the contrary, a more appropriate behavior
> would be to delete all the values of all the attributes listend
> in the old rdn ('cn=Grahame Bowland' AND 'uid=433@pos.publishing').

That's exactly what I thought it was doing - I don't think I was clear 
enough. In the end I did do this by hand, but I thought it was worth 
reporting as a bug that the slapd backend didn't parse the RDN intelligently 
enough to realise multiple attributes require deletion.

> Quoting RFC 2251:
>
>    If the deleteoldrdn parameter is TRUE, the values forming the old
>    RDN are deleted from the entry.  If the deleteoldrdn parameter is
>    FALSE, the values forming the old RDN will be retained as
>    non-distinguished attribute values of the entry.  The server may
>    not perform the operation and return an error code if the setting of
>    the deleteoldrdn parameter would cause a schema inconsistency in the
>    entry.
>
> This is not implemented in OpenLDAP's slapd backends (either back-ldbm
> or back-bdb), which simply issue an error when the delete is not possible.

Thanks!

-- 
Grahame Bowland, Network and Systems Administrator
University Communications Services, The University of Western Australia
Phone: +61 8 9380 1175