39.34. slapi_sdn_set_parent()

Description

This function sets a new parent for a given entry. This is done by keeping the RDN of the original DN of the entry and by adding the DN of its new parent (the value of parentdn) to it.

Syntax

#include "slapi-plugin.h"
Slapi_DN *slapi_sdn_set_parent(Slapi_DN *sdn, const Slapi_DN *parentdn);

Parameters

This function takes the following parameters:

sdn
The Slapi_DN structure containing the DN of the entry.
parentdn
The new parent DN.
Returns

The function returns a pointer to the Slapi_DN structure that contains the DN of the entry after the new parent DN has been set.