ldap_server_conf_save()-- Store Server Information into Local Configuration



  Syntax
 #include <ldap.h>

 typedef struct LDAP_Server_Info {
    char    *lsi_host;        /* LDAP server's hostname */
    unsigned short lsi_port;  /* LDAP port              */
    char    *lsi_suffix;      /* Server's LDAP suffix   */
    char    *lsi_query_key;   /* service_key[.edomain]*/
    char    *lsi_dns_domain;  /* Publishing DNS domain  */
    int      lsi_replica_type;/* master or replica      */
 #define LDAP_LSI_MASTER  1    /* LDAP Master            */
 #define LDAP_LSI_REPLICA 2    /* LDAP Replica           */
    int      lsi_sec_type;    /* SSL or non-SSL         */ 
 #define LDAP_LSI_NOSSL   1    /* Non-SSL                */
 #define LDAP_LSI_SSL     2    /* Secure Server          */
    unsigned short lsi_priority; /* Server priority     */
    unsigned short lsi_weight; /* load balancing weight */
    char    *lsi_vendor_info;  /* vendor information    */
    char    *lsi_info;        /* LDAP Info string       */
    struct LDAP_Server_Info *prev; /* linked list previous ptr */
    struct LDAP_Server_Info *next; /* linked list next ptr     */
 } LDAPServerInfo;

 int ldap_server_conf_save(
       char            *filename,
       unsigned long    ttl,
       LDAPServerInfo  *server_info_listp );

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_server_conf_save() API is used to store server information for the local configuration.


Authorities and Locks

Object Authorities
The caller must have Execute (*X) authority to each directory in the path name preceding the name of the configuration file. The caller must have Write (*W) authority to the configuration file.

Parameters

server_info_listp
(input) A linked list of LDAPServerInfo structures. Each LDAPServerInfo structure defined in the list contains information about an LDAP server. This information will be stored in a file and can be retrieved using ldap_server_locate(). The LDAPServerInfo structure contains the following fields:


filename
(input) The configuration filename. Specify NULL to get the default filename, /QIBM/UserData/OS400/DirSrv/ldap_server_info.conf.
ttl
(input) Specifies the time-to-live (in minutes) for server information saved in the configuration file. Set ttl to zero if it is intended to be a permanent repository of information.

Return Value

LDAP_SUCCESS
if the request was successful.

another LDAP error code
if the request was not successful.

Error Conditions

If ldap_server_conf_save() is not successful, an LDAP error code will be returned. See LDAP Client API Error Conditions for possible LDAP error code values.


Error Messages

The following message may be sent from this function.



Related Information



API introduced: V4R5

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