Skip to content

delete_tree when the server doesn't support the DELETE_TREE control code. #267

Closed
@duffyjp

Description

@duffyjp

I'm trying to use delete_tree to remove an entire OU and all subordinate objects that may be there.

When I try I get subordinate objects must be deleted first
The only difference between delete and delete_tree is that delete_tree adds the control code 1.2.840.113556.1.4.805 to the delete request. That's all fine, but my server apparently doesn't include that code.

I'm thinking the delete_tree method should conditionally use DELETE_TREE if the server includes it in it's :supportedcontrol array, and if not it should manually recurse the tree deleting everything. If I do ldapdelete -r blah blah from the commandline I'm able to do what I'm attempting with Net::LDAP's delete_tree, so I know it's possible.

Does this sound like a good idea? I'd rather build this feature into a Pull request than code it into my specific application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions