eimAddGroupRegistry()--Add a Group Registry to the EIM domain
Syntax
#include <eim.h>
int eimAddGroupRegistry(EimHandle * eim,
char * registryName,
char * registryType,
char * description,
EimRC * eimrc)
Service Program Name: QSYS/QSYEIM
Default Public Authority: *USE
Threadsafe: Yes
The eimAddGroupRegistry() function adds a group 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.
A group registry can be used when a person has the same identity on
multiple systems in the enterprise. You can define one association to the
group registry that is used for all registries that are members of the
group registry. The members of the group registry must have the same
case sensitivity attribute (-caseIgnore or -caseExact) as the group.
A group registry cannot be a member of another group registry. You can
manage the members of a group registry using the Change EIM Registry
(eimChangeRegistry) API.
See EIM Mapping Lookup Algorithm
to see how associations to group registries are used in the
mapping lookup operation.
EIM version 3 must be supported by the local EIM APIs to use this API
(see eimGetVersion()--Get EIM Version).
Authorities and Locks
- EIM Data
- Access to EIM data is controlled by EIM access groups. LDAP administrators
also have access to EIM data. The access groups whose members have authority to
the EIM data for this API follow:
Parameters
- eim (Input)
- The EIM handle returned by a previous call to eimCreateHandle(). A valid
connection is required for this function.
- registryName (Input)
- The name for this group registry. This name needs to be unique within the
EIM domain.
- registryType (Input)
- 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. EIM uses this
information to make sure the appropriate search occurs. When a registry is
case-independent registry user names are converted to uppercase. See eim.h for
a list of predefined types. The type must be either
EIM_REGTYPE_GROUP_REGISTRY_IG ("1.3.18.0.2.33.17-caseIgnore") or
EIM_REGTYPE_GROUP_REGISTRY_EX ("1.3.18.0.2.33.18-caseExact").
- description (Input)
- The description for this new group registry entry. This parameter may be
NULL.
- eimrc (Input/Output)
- The structure in which to return error code information. If the return
value is not 0, eimrc is set with additional information. This parameter may be
NULL. For the format of the structure, see EimRC--EIM
Return Code Parameter.
Return Value
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.
- 0
- Request was successful.
- EACCES
- Access denied. Not enough permissions to access data.
EIMERR_ACCESS (1) |
Insufficient access to EIM data. |
- EBADDATA
- eimrc is not valid.
- EBUSY
- Unable to allocate internal system object.
EIMERR_NOLOCK (26) |
Unable to allocate internal system object. |
- ECONVERT
- Data conversion error.
EIMERR_DATA_CONVERSION (13) |
Error occurred when converting data between code
pages. |
- EEXIST
- EIM registry entry already exists.
EIMERR_REGISTRY_EXISTS (37) |
Registry entry already exists in EIM. |
- EINVAL
- Input parameter was not valid.
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_FUNCTION_NOT_SUPPORTED (70) |
The specified function is not supported
by the EIM version. |
- ENOMEM
- Unable to allocate required space.
EIMERR_NOMEM (27) |
No memory available. Unable to allocate required
space. |
- ENOTCONN
- LDAP connection has not been made.
EIMERR_NOT_CONN (31) |
Not connected to LDAP. Use eimConnect() API and
try the request again. |
- EROFS
- LDAP connection is for read only. Need to connect to master.
EIMERR_READ_ONLY (36) |
LDAP connection is for read only. Use
eimConnectToMaster() to get a write connection. |
- EUNKNOWN
- Unexpected exception.
EIMERR_LDAP_ERR (23) |
Unexpected LDAP error. %s |
EIMERR_UNKNOWN (44) |
Unknown error or unknown system state. |
Restrictions
There is a restriction on the characters allowed for a 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.
, = + < > # ; \ * "
Related Information
Example
See Code disclaimer information
for information pertaining to code examples.
The following example creates a new EIM group registry.
#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 group registry */
if (0 != (rc = eimAddGroupRegistry(handle,
"MyGroupRegistry",
EIM_REGTYPE_GROUP_REGISTRY_IG,
"The group registry",
err)))
printf("Add group registry error = %d", rc);
return 0;
}
API introduced: V5R4