1 /*- 2 * Copyright (c) 2002-2003 Networks Associates Technology, Inc. 3 * Copyright (c) 2004-2017 Dag-Erling Smørgrav 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by ThinkSec AS and 7 * Network Associates Laboratories, the Security Research Division of 8 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 9 * ("CBOSS"), as part of the DARPA CHATS research program. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 3. The name of the author may not be used to endorse or promote 20 * products derived from this software without specific prior written 21 * permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * $OpenPAM: pam_constants.h 938 2017-04-30 21:34:42Z des $ 36 */ 37 38 #ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED 39 #define SECURITY_PAM_CONSTANTS_H_INCLUDED 40 41 #include <security/openpam_version.h> 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 47 /* 48 * XSSO 5.2 49 */ 50 enum { 51 PAM_SUCCESS = 0, 52 PAM_OPEN_ERR = 1, 53 PAM_SYMBOL_ERR = 2, 54 PAM_SERVICE_ERR = 3, 55 PAM_SYSTEM_ERR = 4, 56 PAM_BUF_ERR = 5, 57 PAM_CONV_ERR = 6, 58 PAM_PERM_DENIED = 7, 59 PAM_MAXTRIES = 8, 60 PAM_AUTH_ERR = 9, 61 PAM_NEW_AUTHTOK_REQD = 10, 62 PAM_CRED_INSUFFICIENT = 11, 63 PAM_AUTHINFO_UNAVAIL = 12, 64 PAM_USER_UNKNOWN = 13, 65 PAM_CRED_UNAVAIL = 14, 66 PAM_CRED_EXPIRED = 15, 67 PAM_CRED_ERR = 16, 68 PAM_ACCT_EXPIRED = 17, 69 PAM_AUTHTOK_EXPIRED = 18, 70 PAM_SESSION_ERR = 19, 71 PAM_AUTHTOK_ERR = 20, 72 PAM_AUTHTOK_RECOVERY_ERR = 21, 73 PAM_AUTHTOK_LOCK_BUSY = 22, 74 PAM_AUTHTOK_DISABLE_AGING = 23, 75 PAM_NO_MODULE_DATA = 24, 76 PAM_IGNORE = 25, 77 PAM_ABORT = 26, 78 PAM_TRY_AGAIN = 27, 79 PAM_MODULE_UNKNOWN = 28, 80 PAM_DOMAIN_UNKNOWN = 29, 81 PAM_BAD_HANDLE = 30, /* OpenPAM extension */ 82 PAM_BAD_ITEM = 31, /* OpenPAM extension */ 83 PAM_BAD_FEATURE = 32, /* OpenPAM extension */ 84 PAM_BAD_CONSTANT = 33, /* OpenPAM extension */ 85 PAM_NUM_ERRORS /* OpenPAM extension */ 86 }; 87 88 /* 89 * XSSO 5.3 90 */ 91 enum { 92 PAM_PROMPT_ECHO_OFF = 1, 93 PAM_PROMPT_ECHO_ON = 2, 94 PAM_ERROR_MSG = 3, 95 PAM_TEXT_INFO = 4, 96 PAM_MAX_NUM_MSG = 32, 97 PAM_MAX_MSG_SIZE = 512, 98 PAM_MAX_RESP_SIZE = 512 99 }; 100 101 /* 102 * XSSO 5.4 103 */ 104 enum { 105 /* some compilers promote 0x8000000 to long */ 106 PAM_SILENT = (-0x7fffffff - 1), 107 PAM_DISALLOW_NULL_AUTHTOK = 0x1, 108 PAM_ESTABLISH_CRED = 0x1, 109 PAM_DELETE_CRED = 0x2, 110 PAM_REINITIALIZE_CRED = 0x4, 111 PAM_REFRESH_CRED = 0x8, 112 PAM_PRELIM_CHECK = 0x1, 113 PAM_UPDATE_AUTHTOK = 0x2, 114 PAM_CHANGE_EXPIRED_AUTHTOK = 0x4 115 }; 116 117 /* 118 * XSSO 5.5 119 */ 120 enum { 121 PAM_SERVICE = 1, 122 PAM_USER = 2, 123 PAM_TTY = 3, 124 PAM_RHOST = 4, 125 PAM_CONV = 5, 126 PAM_AUTHTOK = 6, 127 PAM_OLDAUTHTOK = 7, 128 PAM_RUSER = 8, 129 PAM_USER_PROMPT = 9, 130 PAM_REPOSITORY = 10, 131 PAM_AUTHTOK_PROMPT = 11, /* OpenPAM extension */ 132 PAM_OLDAUTHTOK_PROMPT = 12, /* OpenPAM extension */ 133 PAM_HOST = 13, /* OpenPAM extension */ 134 PAM_NUM_ITEMS /* OpenPAM extension */ 135 }; 136 137 #ifdef __cplusplus 138 } 139 #endif 140 141 #endif /* !SECURITY_PAM_CONSTANTS_H_INCLUDED */ 142