RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2057063 - Add support for recursively deleting subentries
Summary: Add support for recursively deleting subentries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: 389-ds-base
Version: 9.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 9.1
Assignee: mreynolds
QA Contact: RHDS QE
David Voženílek
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-22 16:36 UTC by mreynolds
Modified: 2022-12-07 14:36 UTC (History)
7 users (show)

Fixed In Version: 389-ds-base-2.1.3-1.el9
Doc Type: Enhancement
Doc Text:
.Directory Server now supports recursive delete operations when using `ldapdelete` With this enhancement, Directory Server now supports the `Tree Delete Control [1.2.840.113556.1.4.805]` OpenLDAP control. As a result, you can use the `ldapdelete` utility to recursively delete subentries of a parent entry.
Clone Of:
Environment:
Last Closed: 2022-11-15 10:30:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-2028 0 None None None 2022-02-22 16:42:21 UTC
Red Hat Issue Tracker IDMDS-2047 0 None None None 2022-02-28 10:54:06 UTC
Red Hat Issue Tracker RHELPLAN-113069 0 None None None 2022-02-22 16:42:26 UTC
Red Hat Product Errata RHSA-2022:8162 0 None None None 2022-11-15 10:31:04 UTC

Description mreynolds 2022-02-22 16:36:33 UTC
Is your feature request related to a problem? Please describe.
If a parent entries contains any subentry object children there is no way to recursively delete such entry because neither the Subentries Control [1.3.6.1.4.1.4203.1.10.1] (used by OpenLDAP's ldapdelete) nor Tree Delete Control [1.2.840.113556.1.4.805] are supported and so the only resort is to delete such subentries first 1 by 1 before their parent entry can be deleted.

Describe the solution you'd like
Implementing support for Subentries Control [1.3.6.1.4.1.4203.1.10.1] as per RFC3676 should be pretty easy and straightforward and would allow OpenLDAP's ldapdelete pruning iteration to work properly.

Implementing support for Tree Delete Control [1.2.840.113556.1.4.805] as per draft-armijo-ldap-treedelete-02 is a bit more involved however it can be extremely useful for recursive delete operations on large subtrees mainly due to performance considerations.

Ideally it would be nice to have both implemented of course.

Describe alternatives you've considered
Currently the only alternative I know of is to grab the list of subentry objects DNs with ldapsearch and then feed them to ldapdelete with some slicing and dicing in between so those DNs are acceptable.

Comment 1 mreynolds 2022-02-22 16:37:41 UTC
Upstream ticket:

https://github.com/389ds/389-ds-base/issues/4970

Comment 17 errata-xmlrpc 2022-11-15 10:30:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: 389-ds-base security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8162


Note You need to log in before you can comment on or make changes to this bug.