/**************************************************************************/ /* */ /* Licensed Materials - Property of IBM */ /* */ /* "Restricted Materials of IBM" */ /* */ /* IBM Informix Dynamic Server */ /* (c) Copyright IBM Corporation 1996, 2002 All rights reserved. */ /* */ /**************************************************************************/ /* * Copyright (c) 1992-2005, by Sun Microsystems, Inc. * All rights reserved. */ #ifndef _PAM_DEFS_INCL #define _PAM_DEFS_INCL /* * Limits */ #define IFX_PAM_MAX_LEN 256 #define IFX_PAM_MAX_ARGS 16 /* * These are the valid items for pam_get and set calls. */ #define PAM_SERVICE 1 #define PAM_USER 2 #define PAM_TTY 3 #define PAM_RHOST 4 #define PAM_CONV 5 #define PAM_AUTHTOK 6 #define PAM_OLDAUTHTOK 7 #define PAM_RUSER 8 #define PAM_USER_PROMPT 9 #define PAM_REPOSITORY 10 #define PAM_MAX_ITEM_TYPE 10 #define PAM_MIN_ITEM_TYPE 1 /* * PAM return values */ #define PAM_SUCCESS 0 /* Cannot open the module */ #define PAM_OPEN_ERR 1 /* The requested symbol not found in the module */ #define PAM_SYMBOL_ERR 2 /* General purpose error in the service module */ #define PAM_SERVICE_ERR 3 /* General purpose system error */ #define PAM_SYSTEM_ERR 4 /* Memeory allocation error */ #define PAM_BUF_ERR 5 /* Error in the conversation function. Usually a null pointer. */ #define PAM_CONV_ERR 6 /* * Permission problems. This arises if the module is located * in an insecure area or if the permissions on the module are insecure */ #define PAM_PERM_DENIED 7 /* Generally set by the module.*/ #define PAM_IGNORE 8 /* Irrecoverable error in PAM. Application must abort */ #define PAM_ABORT 9 /* Temporary error. Try again. */ #define PAM_TRY_AGAIN 10 /* * Self explanatory authentication and account problems. */ #define PAM_USER_UNKNOWN 11 #define PAM_AUTH_ERR 12 #define PAM_AUTHINFO_UNAVAIL 13 #define PAM_MAXTRIES 14 #define PAM_ACCT_EXPIRED 15 /* * Self explanatory credentials problems. */ #define PAM_CRED_ERR 16 #define PAM_CRED_EXPIRED 17 #define PAM_CRED_UNAVAIL 18 #define PAM_CRED_INSUFFICIENT 19 /* * Problems with the authentication token */ #define PAM_NEW_AUTHTOK_REQD 20 #define PAM_AUTHTOK_EXPIRED 21 #define PAM_AUTHTOK_ERR 22 #define PAM_AUTHTOK_RECOVERY_ERR 23 #define PAM_AUTHTOK_LOCK_BUSY 24 #define PAM_AUTHTOK_DISABLE_AGING 25 /* General error in session management */ #define PAM_SESSION_ERR 27 /* * Used by set and get data functions of the modules. This should not * used by applications. Whether the PAM framework is called by the * user or the module is internally set by the framework. */ #define PAM_NO_MODULE_DATA 26 #define PAM_TOTAL_ERRNUM 28 #define PAM_MIN_ERRNUM 0 #define PAM_MAX_ERRNUM 27 /* * The possible message styles, when communicating with the application. */ /* * PAM_PROMPT_ECHO_OFF indicates that some confidential info like a * password is being asked for. So, the application must not echo the * response. * * PAM_TEXT_INFO is general info that is being sent to the application. */ #define PAM_PROMPT_ECHO_OFF 1 #define PAM_PROMPT_ECHO_ON 2 #define PAM_ERROR_MSG 3 #define PAM_TEXT_INFO 4 /* Limites on the messages */ #define PAM_MAX_NUM_MSG 32 #define PAM_MAX_MSG_SIZE 512 #define PAM_MAX_RESP_SIZE 512 /* * Valid flags for the PAM functions. */ #define PAM_SILENT 0x80000000 /* Password cannot be NULL */ #define PAM_DISALLOW_NULL_AUTHTOK 0x1 /* flags for pam_setcred() */ #define PAM_ESTABLISH_CRED 0x1 #define PAM_DELETE_CRED 0x2 #define PAM_REINITIALIZE_CRED 0x4 #define PAM_REFRESH_CRED 0x8 #define PAM_CHANGE_EXPIRED_AUTHTOK 0x4 #endif /* _PAM_DEFS_INCL */