9.3 PAM Implementation Differences

The data structures used by PAM might differ between platforms. For example, the pam_message structure is defined as follows:

struct pam_message {
    int msg_style;
    const char *msg;

On Oracle Linux, PAM interprets the msg argument as equivalent to the following prototype:

const struct pam_message *msg[]

Functions such as pam_set_item() and pam_get_item() are defined in <security/_pam_types.h> which is included by <security/pam_modules.h>.

The return values from PAM functions differ between platform implementations. For example, a function might return PAM_BAD_ITEM instead of PAM_OPEN_ERR if an error occurs when opening a service module.