ldap_default_dn_get()-- Retrieve the User's Default DN




Syntax

#include <ldap.h>
 
int ldap_default_dn_get(
       char           **default_dn,
       char           *filename)





Threadsafe: Yes

The ldap_default_dn_get() API is used to retrieve the user's default DN. To free the returned string, use ldap_memfree().

An application stores the default DN on disk by calling ldap_default_dn_set(). For the AS/400 system the default file where the default DN stored is called ldap_user_info and will be found in the users home directory. A users home directory is specified in the users profile. The caller must have Execute (*X) authority to each directory in the path name preceding the name of the user information file. The caller must have Read (*R) authority to the user information file.

Authorities and Locks

No OS/400 authority is required. All authority checking is done by the LDAP server.

Parameters

default_dn
(output) Specifies the user's default Distinguished Name.
filename
(Input) Specifies an alternative location for the user's default Distinguished Name storage. If only a filename is given for the filename parameter then the file will be checked in the current directory, otherwise, if a path is given as well as a filename as part of the filename parameter, the file will be checked following the given path. If filename is NULL, a file called ldap_user_info will be checked in the users home directory for reading.

Return Value

LDAP_SUCCESS
if the request was successful.
another LDAP error code
if the request was not successful.

Error Conditions

ldap_default_dn_get() will return LDAP error code if not successful. See LDAP Client API Error Conditions for possible LDAP error code values.

Error Messages

    The following message may be set from this function.
    CPF3CF2 E  Error(s) occurred during running of ldap_default_dn_get API.

Related Information

    ldap_default_dn_set() -- Store the User's Default DN.
    ldap_enetwork_domain_set() -- Store the User's Default eNetwork Domain Name.
    ldap_enetwork_domain_get() -- Retrieve the User's Default eNetwork Domain Name.


Top | LDAP APIs List
APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]