Show Table of Contents
Chapter 39. Functions for Managing DNs
This chapter contains reference information on DN routines.
Table 39.1. DN Routines
| Function | Description |
|---|---|
| slapi_dn_isroot() | Determines if the DN is the root DN for the local database. |
| slapi_dn_normalize_case() | Converts a DN to canonical format and all characters to lower case. |
| slapi_dn_normalize_to_end() | Normalizes part of a DN value. |
| slapi_moddn_get_newdn() | Builds the new DN of an entry. |
| slapi_sdn_add_rdn() | Adds the RDN contained in a Slapi_RDN structure to the DN contained in a Slapi_DN structure. |
| slapi_sdn_compare() | Compares two DNs. |
| slapi_sdn_copy() | Copies a DN. |
| slapi_sdn_done() | Clears a Slapi_DN structure. |
| slapi_sdn_dup() | Duplicates a Slapi_DN structure. |
| slapi_sdn_free() | Frees a Slapi_DN structure. |
| slapi_sdn_get_backend_parent() | Gets the DN of the parent within a specific backend. |
| slapi_sdn_get_dn() | Gets the DN from a Slapi_DN structure. |
| slapi_sdn_get_ndn() | Gets the normalized DN of a Slapi_DN structure. |
| slapi_sdn_get_ndn_len() | Gets the length of the normalized DN of a Slapi_DN structure. |
| slapi_sdn_get_parent() | Get the parent DN of a given Slapi_DN structure. |
| slapi_sdn_get_rdn() | Gets the RDN from an NDN. |
| slapi_sdn_is_rdn_component() | Not implemented; do not use. Checks if there is a RDN value that is a component of the DN structure. |
| slapi_sdn_isempty() | Checks if there is a DN value stored in a Slapi_DN structure. |
| slapi_sdn_isgrandparent() | Checks if a DN is the parent of the parent of a DN. |
| slapi_sdn_isparent() | Checks if a DN is the parent of a DN. |
| slapi_sdn_issuffix() | Checks if a Slapi_DN structure contains a suffix of another. |
| slapi_sdn_new() | Allocates new Slapi_DN structure. |
| slapi_sdn_new_dn_byref() | Creates a new Slapi_DN structure. |
| slapi_sdn_new_dn_byval() | Creates a new Slapi_DN structure. |
| slapi_sdn_new_dn_passin() | Creates a new Slapi_DN structure. |
| slapi_sdn_new_ndn_byref() | Creates a new Slapi_DN structure. |
| slapi_sdn_new_ndn_byval() | Creates a new Slapi_DN structure. |
| slapi_sdn_scope_test() | Checks if an entry is in the scope of a certain base DN. |
| slapi_sdn_set_dn_byref() | Sets a DN value in a Slapi_DN structure. |
| slapi_sdn_set_dn_byval() | Sets a DN value in a Slapi_DN structure. |
| slapi_sdn_set_dn_passin() | Sets a DN value in a Slapi_DN structure. |
| slapi_sdn_set_ndn_byref() | Sets a normalized DN in a Slapi_DN structure. |
| slapi_sdn_set_ndn_byval() | Sets a normalized DN in a Slapi_DN structure. |
| slapi_sdn_set_parent() | Sets a new parent in an entry. |
| slapi_sdn_set_rdn() | Sets a new RDN for an entry. |
39.1. slapi_dn_isroot()
Determines whether the specified DN is the root DN for this local database. Before calling this function, you should call slapi_dn_normalize_case() to normalize the DN and convert all characters to lowercase.
Syntax
#include "slapi-plugin.h" int slapi_dn_isroot( const Slapi_DN *dn );
Parameters
This function takes the following parameters:
|
pb
| Parameter block. |
|
dn
| DN that you want to check. |
Returns
This function returns one of the following values:
- 1 if the specified DN is the root DN of the local database.
- 0 if the specified DN is not the root DN of the local database.
See Also

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.