ldap_enetwork_domain_set()-- Store the User's Default eNetwork Domain Name




Syntax

#include <ldap.h>
 
int ldap_enetwork_domain_set(
       char           *edomain,
       char           *filename)




Threadsafe: Yes

The ldap_enetwork_domain_set() API is used to store the user's default eNetwork domain name (specified as a NULL terminated string).

The eNetwork domain name (along with the user's default Domain Name Service (DNS) domain name) is used to identify the user's LDAP authentication domain. For example, if a user's eNetwork domain name is "chicago", and the user's DNS domain is midwest.illinois.com, then information can be published in DNS that associates ldap.chicago.midwest.illinois.com with a collection of LDAP servers (master(s) and replicas). This permits applications to easily find an appropriate LDAP authentication server, by using the ldap_server_locate() API.

An application can retrieve the eNetwork domain name by calling ldap_enetwork_domain_get().

The eNetwork domain name is stored on disk. For the AS/400 the default file the information will be stored will be called ldap_user_info and will be put into the users home directory. A users home directory is specified in the users profile. The home directory must be created prior to calling ldap_enetwork_domain_set() and is not created as part of the creation of a users profile. It will be stored in the local character set format. 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 write (*W) 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

edomain
(Input) Specifies the name of the eNetwork domain to which the user belongs.

filename
(Input) Specifies an alternative location for the user's default eNetwork domain name. If only a filename is given for the filename parameter then a file will be created 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 created following the given path.

Return Value

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

Error Conditions

ldap_enetwork_domain_set() 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_enetwork_domain_set API.

Related Information

    ldap_default_dn_set() -- Store the User's Default DN.
    ldap_default_dn_get() -- Retrieve the User's Default DN.
    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]