#include <eim.h> int eimSetConfiguration(int enable, char * ldapURL, char * localRegistry, char * kerberosRegistry, int ccsid, EimRC * eimrc)Service Program Name: QSYS/QSYEIM
The eimSetConfiguration() function sets the configuration information for use by the system.
The caller of the API must have *SECADM special authority.
0 | Not enabled to participate in EIM domain. New connections may not be established with the configured EIM domain |
non-zero | Enabled to participate in EIM domain. New connections may be established with the EIM domain. |
Possible values are:
NULL | A value of NULL indicates that it should not change. |
EIM_CONFIG_NONE | (*NONE) This value indicates that this system is not configured for EIM. |
ldapURL | A URL that contains EIM domain controller information. |
This URL has the following format:
ldap://host:port/dn or ldaps://host:port/dn
where:
Examples:
Possible values are:
NULL | A value of NULL indicates that it should not change. |
EIM_CONFIG_NONE | (*NONE) This value indicates that there is no local system registry. |
registry | The local EIM system registry name. |
Possible values are:
NULL | A value of NULL indicates that it should not change. |
EIM_CONFIG_NONE | (*NONE) This value indicates that there is no kerberos registry for EIM. |
registry | The EIM Kerberos registry name. This is the Kerberos realm name. |
The return value from the API. Following each return value is the list of possible values for the messageCatalogMessageID field in the eimrc parameter for that value.
EIMERR_AUTH_ERR (7) | Insufficient authority for the operation. |
EIMERR_NOLOCK (26) | Unable to allocate internal system object. |
EIMERR_DATA_CONVERSION (13) | Error occurred when converting data between code pages. |
EIMERR_CCSID_INVAL (8) | CCSID is outside of valid range or CCSID is not supported. |
EIMERR_CHAR_INVAL (21) | A restricted character was used in the object name. Check the API for a list of restricted characters. |
EIMERR_PTR_INVAL (35) | Pointer parameter is not valid. |
EIMERR_URL_NODN (45) | URL has no dn (required). |
EIMERR_URL_NODOMAIN (46) | URL has no domain (required). |
EIMERR_URL_NOHOST (47) | URL does not have a host. |
EIMERR_URL_NOTLDAP (49) | URL does not begin with ldap. |
EIMERR_INVALID_DN (66) | Distinguished Name (DN) is not valid. |
EIMERR_REGNAME_SIZE (39) | Local registry name is too large. |
EIMERR_URL_SIZE (51) | Configuration URL is too large. |
EIMERR_NOMEM (27) | No memory available. Unable to allocate required space. |
EIMERR_LDAP_ERR (23) | Unexpected LDAP error. %s |
EIMERR_UNKNOWN (44) | Unknown error or unknown system state. |
See Code disclaimer information for information pertaining to code examples.
The following example sets the configuration information but it is not enabled.
#include <eim.h> #include <stdio.h> int main(int argc, char *argv[]) { int rc; char eimerr[100]; EimRC * err; char * ldapURL= "ldap://mysystem:389/ibm-eimDomainName=myEIMDomain,o=mycompany,c=us"; char * local = "mysystem"; char * kerberos= "krbprin"; /* Set up error structure. */ memset(eimerr,0x00,100); err = (EimRC *)eimerr; err->memoryProvidedByCaller = 100; /* Set config info, but it is disabled. */ if (0 != (rc = eimSetConfiguration(0, ldapURL, local, kerberos, 0, err))) printf("Set configuration error = %d", rc); return 0; }
In this example, the configuration information is not changed but it is now enabled for use.
#include <eim.h> #include <stdio.h> int main(int argc, char *argv[]) { int rc; char eimerr[100]; EimRC * err; /* Set up error structure. */ memset(eimerr,0x00,100); err = (EimRC *)eimerr; err->memoryProvidedByCaller = 100; /* Enable configuration info. */ if (0 != (rc = eimSetConfiguration(1, NULL, NULL, NULL, 0, err))) printf("Set configuration error = %d", rc); return 0; }
Top | Security APIs | APIs by category |