#include <eim.h> int eimAddSystemRegistry(EimHandle * eim, char * registryName, char * registryType, char * description, char * URI, EimRC * eimrc)Service Program Name: QSYS/QSYEIM
The eimAddSystemRegistry() function adds a system registry to the EIM domain. Once added, this registry is participating in the EIM domain. Mapping associations can only be made with identities in registries that are currently participating in the EIM domain.
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_ACCESS (1) | Insufficient access to EIM data. |
EIMERR_NOLOCK (26) | Unable to allocate internal system object. |
EIMERR_DATA_CONVERSION (13) | Error occurred when converting data between code pages. |
EIMERR_REGISTRY_EXISTS (37) | Registry entry already exists in EIM. |
EIMERR_CHAR_INVAL (21) | A restricted character was used in the object name. Check the API for a list of restricted characters. |
EIMERR_HANDLE_INVAL (17) | EimHandle is not valid. |
EIMERR_PARM_REQ (34) | Missing required parameter. Please check API documentation. |
EIMERR_PTR_INVAL (35) | Pointer parameter is not valid. |
EIMERR_REGTYPE_INVAL (62) | Registry type is not valid. |
EIMERR_NOMEM (27) | No memory available. Unable to allocate required space. |
EIMERR_NOT_CONN (31) | Not connected to LDAP. Use eimConnect() API and try the request again. |
EIMERR_READ_ONLY (36) | LDAP connection is for read only. Use eimConnectToMaster() to get a write connection. |
EIMERR_LDAP_ERR (23) | Unexpected LDAP error. %s |
EIMERR_UNKNOWN (44) | Unknown error or unknown system state. |
The registry type is comprised of two pieces: a string form of an OID that represents the registry type and a user name normalization method. The normalization method is necessary because some registries are case-independent and others are case-dependent. Platforms can define their own registry type. They would first define a unique OID for their registry and then concatenate it with the predefined normalization methods. Refer to eim.h for the supported normalization methods.
Example:
#define MYREGOID "7.6.5.4.3.2.1" MyRegType = MYREGOID + EIM_NORM_CASE_IGNORE;
There is a restriction on the characters allowed for registry name.
The following characters are special characters that are not allowed in object names. They also should not be used in object attributes that would be used for a search operation.
, = + < > # ; \ * "
The following example creates a new EIM system registry.
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
#include <eim.h> #include <stdio.h> int main(int argc, char *argv[]) { int rc; char eimerr[100]; EimRC * err; EimHandle * handle; /* Get eim handle from input arg. */ /* This handle is already connected to EIM. */ handle = (EimHandle *)argv[1]; /* Set up error structure. */ memset(eimerr,0x00,100); err = (EimRC *)eimerr; err->memoryProvidedByCaller = 100; /* Add new system registry */ if (0 != (rc = eimAddSystemRegistry(handle, "MyRegistry", EIM_REGTYPE_OS400, "The first registry", NULL, err))) printf("Add system registry error = %d", rc); return 0; }
[ Back to top | Security APIs | APIs by category ]