7 #include "pam_private.h"
9 const char *pam_strerror(pam_handle_t *pamh, int errnum)
11 #ifdef UGLY_HACK_FOR_PRIOR_BEHAVIOR_SUPPORT /* will be removed from v 1.0 */
15 possible_error = (int) pamh;
16 if (!(possible_error >= 0 && possible_error <= PAM_BAD_ITEM)) {
17 possible_error = errnum;
20 /* mask standard behavior to use possible_error variable. */
21 #define errnum possible_error
23 #endif /* UGLY_HACK_FOR_PRIOR_BEHAVIOR_SUPPORT */
29 return "Critical error - immediate abort";
31 return "dlopen() failure";
33 return "Symbol not found";
35 return "Error in service module";
37 return "System error";
39 return "Memory buffer error";
41 return "Permission denied";
43 return "Authentication failure";
44 case PAM_CRED_INSUFFICIENT:
45 return "Insufficient credentials to access authentication data";
46 case PAM_AUTHINFO_UNAVAIL:
47 return "Authentication service cannot retrieve authentication info.";
48 case PAM_USER_UNKNOWN:
49 return "User not known to the underlying authentication module";
51 return "Have exhasted maximum number of retries for service.";
52 case PAM_NEW_AUTHTOK_REQD:
53 return "Authentication token is no longer valid; new one required.";
54 case PAM_ACCT_EXPIRED:
55 return "User account has expired";
57 return "Cannot make/remove an entry for the specified session";
58 case PAM_CRED_UNAVAIL:
59 return "Authentication service cannot retrieve user credentials";
60 case PAM_CRED_EXPIRED:
61 return "User credentials expired";
63 return "Failure setting user credentials";
64 case PAM_NO_MODULE_DATA:
65 return "No module specific data is present";
67 return "Bad item passed to pam_*_item()";
69 return "Conversation error";
71 return "Authentication token manipulation error";
72 case PAM_AUTHTOK_RECOVER_ERR:
73 return "Authentication information cannot be recovered";
74 case PAM_AUTHTOK_LOCK_BUSY:
75 return "Authentication token lock busy";
76 case PAM_AUTHTOK_DISABLE_AGING:
77 return "Authentication token aging disabled";
79 return "Failed preliminary check by password service";
81 return "Please ignore underlying account module";
82 case PAM_MODULE_UNKNOWN:
83 return "Module is unknown";
84 case PAM_AUTHTOK_EXPIRED:
85 return "Authentication token expired";
87 return "Conversation is waiting for event";
89 return "Application needs to call libpam again";
92 return "Unknown PAM error";