eimChangeIdentifier()-- Change EIM Identifier


  Syntax
 #include <eim.h>

 int eimChangeIdentifier(EimHandle              * eim,
                         EimIdentifierInfo      * idName,
                         enum EimIdentifierAttr   attrName,
                         char                   * attrValue,
                         enum EimChangeType       changeType,
    EimRC                  * eimrc)

 
  Service Program Name: QSYS/QSYEIM

  Default Public Authority: *USE

  Threadsafe: Yes

The eimChangeIdentifier() function modifies an existing EIM identifier.


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:
  • EIM Administrator
  • EIM Identifiers Administrator

Parameters

eim  (Input)
The EIM handle returned by a previous call to eimCreateHandle(). A valid connection is required for this function.

idName  (Input)
A structure that contains the name for this identifier. The layout of the EimIdentifierInfo structure follows:
   enum EimIdType {
       EIM_UNIQUE_NAME,                       
       EIM_ENTRY_UUID,
       EIM_NAME
   };

   typedef struct EimIdentifierInfo
   {
       union {
           char       * uniqueName;
           char       * entryUUID;
           char       * name;
       } id;
       enum EimIdType        idtype;
   } EimIdentifierInfo;

idtype will indicate which identifier name has been provided. Use of the uniqueName will provide the best performance. There is no guarantee that name will find a unique identifier. Therefore, use of name may result in an error.


attrName
The attribute to be updated. This parameter is passed by value. Valid values are:


attrValue  (Input)
The new value for the attribute.

changeType  (Input)
The type of change to make. This could be add, remove, or change. This parameter is passed by value.   attrName parameter indicates which type is allowed for each attribute.

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.


EBADDATA
eimrc is not valid.

EBADNAME
Identifier name is not valid or insufficient access to EIM data.


EBUSY
Unable to allocate internal system object.


ECONVERT
Data conversion error.


EINVAL
Input parameter was not valid.


ENOMEM
Unable to allocate required space.


ENOTCONN
LDAP connection has not been made.


EROFS
LDAP connection is for read only. Need to connect to master.


EUNKNOWN
Unexpected exception.


Restrictions

There is a restriction on the characters allowed for identifier 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

The following example will change an EIM identifier description.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

#include <eim.h>

int main(int argc, char *argv[])
{
    int           rc;
    char          eimerr[100];
    EimRC       * err;
    EimHandle   * handle;
    EimIdentifierInfo idInfo;

    /* 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;

    /* Set up identifier information           */
    idInfo.idtype = EIM_UNIQUE_NAME;
    idInfo.id.uniqueName = "Mary Smith";
    
    /* Change the description of the identifier */
    if (0 != (rc = eimChangeIdentifier(handle,
                                        &idInfo,
                                        EIM_IDENTIFIER_DESCRIPTION,
                                        "This is a new description",
                                        EIM_CHG,
                                        err)))
        printf("Change identifier error = %d", rc);

    return 0;
}


API introduced: V5R2

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