Compartir a través de


LDAP_SERVER_TREE_DELETE_OID control code

The LDAP_SERVER_TREE_DELETE_OID control is used with an extended LDAP delete function to delete an entire subtree in the directory.

To use this control, set the members of the LDAPControl structure as follows.

PWCHAR ldctl_oid = LDAP_SERVER_TREE_DELETE_OID;
struct berval ldctl_value = {0, NULL};
BOOLEAN ldctl_iscritical;

Members

ldctl_oid

LDAP_SERVER_TREE_DELETE_OID, which is defined as "1.2.840.113556.1.4.805".

ldctl_value

No data for this control. In the berval structure, set bv_len to zero and bv_val to NULL.

ldctl_iscritical

Can be TRUE or FALSE depending on whether the operation is critical to your application.

Remarks

The Tree Delete control is used with the extended delete functions, such as ldap_delete_ext, to delete an entire directory subtree. This control must be exclusively used with the LDAP DelRequest message and will be ignored if used otherwise. However, if the criticality field is set to TRUE and the control is used with other than the DelRequest message, the request will fail and return an LDAP_UNAVAILABLE_CRIT_EXTENSION error. Server authentication of proper user permissions before completing the operation is required.

Error Messages

InsufficientAccessRights (50)

The authenticated user does not possess the proper permissions to exercise this control.

UnwillingToPerform (53)

The server is not the authority for the selected tree or the container contains platform specific restraints against deletion.

AdminLimitExceeded (11)

The limit of the number of objects that can be deleted in one operation is exceeded. However, all objects processed up to the limit will be deleted. The DelRequest with the Tree Delete control may be resubmitted until a success response is received.

If a Tree Delete control request fails, it may be retried with no adverse effects.

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Ntldap.h

See also

Data Structures

LDAPMessage

Using Controls