Return PAM_AUTHTOK_ERR when length exceeds limit

Currently, when the length of username or password exceeds IPMI limit,
it returns PAM_NEW_AUTHTOK_REQD. But according to the man page of
pam_sm_chauthtok, PAM_NEW_AUTHTOK_REQD is not a vaild return value.
Return PAM_AUTHTOK_ERR instead.

Tested:
Try updating a user in ipmi group with a 21-char password by calling
pam_chauthtok, PAM_AUTHTOK_ERR is returned.

Change-Id: Ia055f253865e9f4174dcbee8eec87917b7612f94
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
2 files changed