Purpose
This function verifies the correctness of
the user ID and password passed in, on the iSeries™ system that the specified system
object represents. If the user ID and password are correct, it also retrieves
data related to signon attempts and password expiration.
Note: Passing
an incorrect password on the cwbCO_VerifyUserIDPassword API
increments the invalid signon attempts counter for the specified user. The
user profile is disabled if sufficient invalid passwords are sent to the host.
Syntax
UINT CWB_ENTRY cwbCO_VerifyUserIDPassword(
cwbCO_SysHandle system,
LPCSTR userID,
LPCSTR password,
cwbSV_ErrHandle errorHandle );
Parameters
- cwbCO_SysHandle system - input
- Handle that previously was returned from cwbCO_CreateSystem or cwbCO_CreateSystemLike.
It identifies the iSeries system.
- LPCSTR userID - input
- Pointer to a buffer that contains the NULL-terminated user ID, which must
not exceed CWBCO_MAX_USER_ID characters in length, not including the terminating
NULL.
- LPCSTR password - input
- A pointer to a buffer that contains the NULL-terminated password. The
maximum length is CWBCO_MAX_PASSWORD + 1 bytes in length, including the NULL
terminator.
- cwbSV_ErrHandle errorHandle - input/output
- Any returned messages will be written to this object. It is created with
the cwbSV_CreateErrHandle API. The messages may be retrieved
through the cwbSV_GetErrText API. If the parameter is set
to zero, or if the errorHandle is invalid, no messages will be retrieved.
Return Codes
The following list shows common return
values:
- CWB_OK
- Successful completion.
- CWB_INVALID_API_HANDLE
- Invalid system handle.
- CWB_INVALID_POINTER
- A pointer supplied to the API is not valid.
- CWB_UNKNOWN_USERID
- The supplied user ID is not known to this system.
- CWB_WRONG_PASSWORD
- Password is not correct.
- CWB_PASSWORD_EXPIRED
- Password has expired.
- CWB_USER_PROFILE_DISABLED
- The user ID has been disabled.
- CWB_INVALID_PASSWORD
- One or more characters in the password is invalid or the password is too
long.
- CWB_INVALID_USERID
- One or more characters in the user ID is invalid or the user ID is too
long.
- CWB_NOT_ENOUGH_MEMORY
- Insufficient memory; may have failed to allocate a temporary buffer.
- CWB_API_ERROR
- General API failure.