ldap_dn2ufn()--Convert a Distinguished Name into a User Friendly Name


  Syntax
 #include <ldap.h>
 
 char *ldap_dn2ufn(
               const char  *dn)

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_dn2ufn() function takes a distinguished name (DN) and converts into a "friendlier" representation by removing the attribute type that is associated with each relative distinguished name (RDN). For example, the DN "cn=John Doe,ou=Widget Division,ou=Austin,o=IBM,c=US" would be returned in its "friendlier" form as "John Doe, Widget Division, Austin, IBM, US". Space for the user-friendly name will have been obtained by the API, and should be freed by the caller with a call to ldap_memfree().


Authorities and Locks

No IBM® i authority is required.


Parameters

dn
(Input) Specifies the DN to be converted (as returned from ldap_get_dn()).

Return Value

Character String
if the request was successful.

NULL
if the request was not successful.

Error Conditions

If ldap_dn2ufn() is not successful, then there was no memory available for the character string.


Error Messages

The following message may be sent from this function.

Message ID Error Message Text
CPF3CF2 E Error(s) occurred during running of ldap_dn2ufn API.


Related Information



API introduced: V5R1

[ Back to top | LDAP APIs | APIs by category ]