![Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual Download Page 65](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-2-gateway-customization/netscape-directory-server-6-2-gateway-customization_manual_1674642065.webp)
Working with DNs and RDNs
Chapter
5
Front-End API Functions
65
Working with DN Suffixes
A suffix of a DN identifies a subtree in the directory tree where the DN is located.
For example, consider the following DN:
cn=Babs Jensen, ou=Product Development, o=Example Corporation, c=US
In this case, one of the suffixes is:
o=Example Corporation, c=US
This suffix indicates that the
Babs Jensen
entry is located in the
Example
Corporation
subtree in the directory tree.
To determine if a value is a suffix for a DN, call
slapi_dn_issuffix()
. To
determine if a DN is one of the suffixes served by the back-end, call the
slapi_dn_isbesuffix()
function.
Server Suffixes
The
suffix
directive in the server configuration file specifies which DNs are
served by a particular back-end. For example, suppose the suffix directive is
configured to the following:
suffix “o=Example Corporation, c=US”
Here, all entries within the “o=Example Corporation, c=US” subtree are served by
this back-end.
Getting the Parent DN of a DN
To get a copy of the parent DN for a DN, call the
slapi_dn_parent()
function or
the
slapi_dn_beparent()
function.
These functions return the parent DN of
dn
. If
dn
is a suffix served by the back-end,
slapi_dn_beparent()
will return
NULL
.
When you are done working with the parent DN, you should free it from memory
by calling
free()
.
Normalizing a DN
If you need to compare DNs (for example, if you are searching your database for a
particular DN), you should normalize the DNs that you are comparing to ensure
that they are properly compared.
Summary of Contents for NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Page 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Page 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...