#include <security/pam_appl.h>

enum {
    $SUCCESS = PAM_SUCCESS,
    $OPEN_ERR = PAM_OPEN_ERR,
    $SYMBOL_ERR = PAM_SYMBOL_ERR,
    $SERVICE_ERR = PAM_SERVICE_ERR,
    $SYSTEM_ERR = PAM_SYSTEM_ERR,
    $BUF_ERR = PAM_BUF_ERR,
    $PERM_DENIED = PAM_PERM_DENIED,
    $AUTH_ERR = PAM_AUTH_ERR,
    $CRED_INSUFFICIENT = PAM_CRED_INSUFFICIENT,
    $AUTHINFO_UNAVAIL = PAM_AUTHINFO_UNAVAIL,
    $USER_UNKNOWN = PAM_USER_UNKNOWN,
    $MAXTRIES = PAM_MAXTRIES,
    $NEW_AUTHOTK_REQD = PAM_NEW_AUTHTOK_REQD,
    $ACCT_EXPIRED = PAM_ACCT_EXPIRED,
    $SESSION_ERR = PAM_SESSION_ERR,
    $CRED_UNAVAIL = PAM_CRED_UNAVAIL,
    $CRED_EXPIRED = PAM_CRED_EXPIRED,
    $CRED_ERR = PAM_CRED_ERR,
    $NO_MODULE_DATA = PAM_NO_MODULE_DATA,
    $CONV_ERR = PAM_CONV_ERR,
    $AUTHTOK_ERR = PAM_AUTHTOK_ERR,
    $AUTHTOK_RECOVERY_ERR = PAM_AUTHTOK_RECOVERY_ERR,
    $AUTHTOK_LOCK_BUSY = PAM_AUTHTOK_LOCK_BUSY,
    $AUTHTOK_DISABLE_AGING = PAM_AUTHTOK_DISABLE_AGING,
    $TRY_AGAIN = PAM_TRY_AGAIN,
    $IGNORE = PAM_IGNORE,
    $ABORT = PAM_ABORT,
    $AUTHTOK_EXPIRED = PAM_AUTHTOK_EXPIRED,
    $MODULE_UNKNOWN = PAM_MODULE_UNKNOWN,

#if !defined(PAM_BAD_ITEM)
    $BAD_ITEM = PAM_SYMBOL_ERR,
#else
    $BAD_ITEM = PAM_BAD_ITEM,
#endif

#if !defined(PAM_CONV_AGAIN)
    $CONV_AGAIN = PAM_SYMBOL_ERR,
#else
    $CONV_AGAIN = PAM_CONV_AGAIN,
#endif

#if !defined(PAM_INCOMPLETE)
    $INCOMPLETE = PAM_SYMBOL_ERR
#else
    $INCOMPLETE = PAM_INCOMPLETE
#endif

};

enum {
    $SILENT = PAM_SILENT,
    $DISALLOW_NULL_AUTHTOK = PAM_DISALLOW_NULL_AUTHTOK,
    $ESTABLISH_CRED = PAM_ESTABLISH_CRED,
    $DELETE_CRED = PAM_DELETE_CRED,
    $REINITIALIZE_CRED = PAM_REINITIALIZE_CRED,
    $REFRESH_CRED = PAM_REFRESH_CRED,
    $CHANGE_EXPIRED_AUTHTOK = PAM_CHANGE_EXPIRED_AUTHTOK
};

enum {
    $SERVICE = PAM_SERVICE,
    $USER = PAM_USER,
    $TTY = PAM_TTY,
    $RHOST = PAM_RHOST,
    $CONV = PAM_CONV,
    $AUTHTOK = PAM_AUTHTOK,
    $OLDAUTHTOK = PAM_OLDAUTHTOK,
    $RUSER = PAM_RUSER,
    $USER_PROMPT = PAM_USER_PROMPT,

    /* Linux-PAM extensions.  Leaving these out, for now...
    $FAIL_DELAY = PAM_FAIL_DELAY,
    $XDISPLAY = PAM_XDISPLAY,
    $XAUTHDATA = PAM_XAUTHDATA,
    $AUTHTOK_TYPE = PAM_AUTHTOK_TYPE
     */
};

enum {
    $PROMPT_ECHO_OFF = PAM_PROMPT_ECHO_OFF,
    $PROMPT_ECHO_ON = PAM_PROMPT_ECHO_ON,
    $ERROR_MSG = PAM_ERROR_MSG,
    $TEXT_INFO = PAM_TEXT_INFO
};


