pam_strerror Subroutine
Purpose
Translates a PAM error code to a string message.
Library
PAM Library (libpam.a)
Syntax
#include <security/pam_appl.h>
const char *pam_strerror (PAMHandle, ErrorCode)
pam_handle_t *PAMHandle;
int ErrorCode;
Description
The pam_strerror subroutine uses the error number returned by the PAM routines and returns the PAM error message that is associated with that error number. If the error number is not known to pam_strerror, or there is no translation error message, then NULL is returned. The caller should not free or modify the returned string.
Parameters
Item | Description |
---|---|
PAMhandle | The PAM handle representing the current user authentication session. This handle is obtained by a call to pam_start(). |
ErrorCode | The PAM error code for which the PAM error message is to be retrieved. |
Return Values
Upon successful completion, pam_strerror returns the PAM error message corresponding to the PAM error code, ErrorCode. A NULL pointer is returned if the routine fails, the error code is not known, or no error message exists for that error code.