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

Re: Patch to fix bug in modrdn

At 01:22 AM 2/23/01 +0800, Grahame Bowland wrote:
>If you specify a newrdn that is the same as the existing rdn, with 
>deleteoldrdn true, the ldbm backend will perform the operation without 
>checking for a possible schema violation. The attribute for the RDN 
>is set to the same value and then removed; the entry is then declared 
>invalid and vanishes from the directory.
>The following patch catches this case and prints an error message. Is it 

Depends on whether new superior was set.  If new superior is not
set, it should be an error to rename the rdn to the current
value.  If new superior is set, it should be different from the
current superior, else error.  If set and different, then the
newrdn same as old should be allowed (and deleteold ignored).

>On another note, is anybody working to make modrdn (with ldbm) move the 
>child nodes of the entry being moved?


>At the moment it doesn't seem to 
>work - moving a node with children moves the node, but the children vanish.
>I can't see any code in place to attempt this.

Until we move the whole subtree, the move shouldn't take place
if there are children.  Seems we have a new bug as we use to
catch this.

>If nobody is working on this, I can have a look at it.
>The attached patch is against the OpenLDAP 2.0.7 source. It applies to 

I note patches for incorporation into OpenLDAP should be submitted
using our issue tracking system per our developer' guidelines.
see docs in http://www.openldap.org/devel for details.

>Grahame Bowland                               
>University Communications Services, The University of Western Australia
>Phone: +61 8 9380 1175