__convert_id_np() — Convert between DCE UUID and user ID

Standards

Standards / Extensions C or C++ Dependencies
z/OS® UNIX both  

Format

#include <unistd.h>

int __convert_id_np(int function_code,
                    char *principal_uuid,
                    char *cell_uuid,
                    char *userid);

General description

The __convert_id_np() function is used to retrieve the DCE UUID associated with a userid or the userid associated with a DCE UUID.

This function is intended for DCE servers which process requests from multiple clients. For example, DCE RPC requests from clients are identified by a DCE UUID only. This function enables servers to extract the userid of the requester.

The parameters supported are:
function_code
Identifies whether extracting a userid or UUID. Possible function codes are:
__GET_USERID
Return the userid associated with the specified UUIDs.
__GET_UUID
Return the UUIDs associated with the specified userid.
principal_uuid
When __GET_USERID is specified, principal_uuid contains the UUID of the user for the specified userid. When __GET_UUID is specified, principal_uuid returns the extracted UUID for the userid specified. The caller must provide a 36-byte field for the returned principal_uuid.
cell_uuid
When _GET_USERID is specified, cell_uuid should contain the cell UUID if known. If not known, cell_uuid must be NULL. When __GET_UUID is specified, cell_uuid will return the extracted cell UUID, if it is defined for the specified userid. The caller must provide a 36-byte field for the returned cell_uuid.
userid
When _GET_USERID is specified, userid will return the extracted userid for the specified UUID. The caller must provide a 9 byte field for the returned userid. When __GET_UUID is specified, userid contains the userid for whom the UUID should be extracted. The userid must be 1 to 8 characters in length.

Returned value

If successful, __convert_id_np() returns 0.

If unsuccessful, __convert_id_np() returns -1 and sets errno to one of the following values:
Error Code
Description
EINVAL
One of the following errors was detected:
  • function_code specified is undefined.
  • __GET_UUID was specified and userid is not in the range 1 to 8 characters long.
  • __GET_USERID was specified and userid was not 9 character long
EMVSERR
An MVS™ environmental or internal error occurred.
EMVSSAF2ERR
One of the following errors was detected:
  • Received an unexpected return code for the security product.
  • The security product detected an error in the input parameters.
  • An internal error occurred in the security product.
ENOSYS
One of the following errors was detected:
  • No security product is installed on the system.
  • The security product does not have support for this function.
ESRCH
One of the following errors was detected:
  • No mapping exists between a UUID and Userid.
  • No mapping exists between a Userid and UUID.
  • The DCEUUIDS class is not active.
  • __GET_UUID was specified and no cell UUID is defined for the userid.
  • The userid is not defined to the security product.

Related information