1*0d9d0fd8Schristos /* $NetBSD: pam_constants.h,v 1.8 2023/06/30 21:46:20 christos Exp $ */ 244269bb5Schristos 344269bb5Schristos /*- 444269bb5Schristos * Copyright (c) 2002-2003 Networks Associates Technology, Inc. 54cb4af11Schristos * Copyright (c) 2004-2017 Dag-Erling Smørgrav 644269bb5Schristos * All rights reserved. 744269bb5Schristos * 844269bb5Schristos * This software was developed for the FreeBSD Project by ThinkSec AS and 944269bb5Schristos * Network Associates Laboratories, the Security Research Division of 1044269bb5Schristos * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 1144269bb5Schristos * ("CBOSS"), as part of the DARPA CHATS research program. 1244269bb5Schristos * 1344269bb5Schristos * Redistribution and use in source and binary forms, with or without 1444269bb5Schristos * modification, are permitted provided that the following conditions 1544269bb5Schristos * are met: 1644269bb5Schristos * 1. Redistributions of source code must retain the above copyright 1744269bb5Schristos * notice, this list of conditions and the following disclaimer. 1844269bb5Schristos * 2. Redistributions in binary form must reproduce the above copyright 1944269bb5Schristos * notice, this list of conditions and the following disclaimer in the 2044269bb5Schristos * documentation and/or other materials provided with the distribution. 2144269bb5Schristos * 3. The name of the author may not be used to endorse or promote 2244269bb5Schristos * products derived from this software without specific prior written 2344269bb5Schristos * permission. 2444269bb5Schristos * 2544269bb5Schristos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2644269bb5Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2744269bb5Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2844269bb5Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2944269bb5Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3044269bb5Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3144269bb5Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3244269bb5Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3344269bb5Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3444269bb5Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3544269bb5Schristos * SUCH DAMAGE. 3644269bb5Schristos */ 3744269bb5Schristos 3844269bb5Schristos #ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED 3944269bb5Schristos #define SECURITY_PAM_CONSTANTS_H_INCLUDED 4044269bb5Schristos 4144269bb5Schristos #include <security/openpam_version.h> 4244269bb5Schristos 4344269bb5Schristos #ifdef __cplusplus 4444269bb5Schristos extern "C" { 4544269bb5Schristos #endif 4644269bb5Schristos 4744269bb5Schristos /* 4844269bb5Schristos * XSSO 5.2 4944269bb5Schristos */ 5044269bb5Schristos enum { 5144269bb5Schristos PAM_SUCCESS = 0, 5244269bb5Schristos PAM_OPEN_ERR = 1, 5344269bb5Schristos PAM_SYMBOL_ERR = 2, 5444269bb5Schristos PAM_SERVICE_ERR = 3, 5544269bb5Schristos PAM_SYSTEM_ERR = 4, 5644269bb5Schristos PAM_BUF_ERR = 5, 5744269bb5Schristos PAM_CONV_ERR = 6, 5844269bb5Schristos PAM_PERM_DENIED = 7, 5944269bb5Schristos PAM_MAXTRIES = 8, 6044269bb5Schristos PAM_AUTH_ERR = 9, 6144269bb5Schristos PAM_NEW_AUTHTOK_REQD = 10, 6244269bb5Schristos PAM_CRED_INSUFFICIENT = 11, 6344269bb5Schristos PAM_AUTHINFO_UNAVAIL = 12, 6444269bb5Schristos PAM_USER_UNKNOWN = 13, 6544269bb5Schristos PAM_CRED_UNAVAIL = 14, 6644269bb5Schristos PAM_CRED_EXPIRED = 15, 6744269bb5Schristos PAM_CRED_ERR = 16, 6844269bb5Schristos PAM_ACCT_EXPIRED = 17, 6944269bb5Schristos PAM_AUTHTOK_EXPIRED = 18, 7044269bb5Schristos PAM_SESSION_ERR = 19, 7144269bb5Schristos PAM_AUTHTOK_ERR = 20, 7244269bb5Schristos PAM_AUTHTOK_RECOVERY_ERR = 21, 7344269bb5Schristos PAM_AUTHTOK_LOCK_BUSY = 22, 7444269bb5Schristos PAM_AUTHTOK_DISABLE_AGING = 23, 7544269bb5Schristos PAM_NO_MODULE_DATA = 24, 7644269bb5Schristos PAM_IGNORE = 25, 7744269bb5Schristos PAM_ABORT = 26, 7844269bb5Schristos PAM_TRY_AGAIN = 27, 7944269bb5Schristos PAM_MODULE_UNKNOWN = 28, 8044269bb5Schristos PAM_DOMAIN_UNKNOWN = 29, 814cb4af11Schristos PAM_BAD_HANDLE = 30, /* OpenPAM extension */ 824cb4af11Schristos PAM_BAD_ITEM = 31, /* OpenPAM extension */ 834cb4af11Schristos PAM_BAD_FEATURE = 32, /* OpenPAM extension */ 844cb4af11Schristos PAM_BAD_CONSTANT = 33, /* OpenPAM extension */ 8544269bb5Schristos PAM_NUM_ERRORS /* OpenPAM extension */ 8644269bb5Schristos }; 8744269bb5Schristos 8844269bb5Schristos /* 8944269bb5Schristos * XSSO 5.3 9044269bb5Schristos */ 9172d8d6c3Schristos enum openpam_message_items { 9244269bb5Schristos PAM_PROMPT_ECHO_OFF = 1, 9344269bb5Schristos PAM_PROMPT_ECHO_ON = 2, 9444269bb5Schristos PAM_ERROR_MSG = 3, 9544269bb5Schristos PAM_TEXT_INFO = 4, 9644269bb5Schristos PAM_MAX_NUM_MSG = 32, 9744269bb5Schristos PAM_MAX_MSG_SIZE = 512, 9844269bb5Schristos PAM_MAX_RESP_SIZE = 512 9944269bb5Schristos }; 10044269bb5Schristos 10144269bb5Schristos /* 10244269bb5Schristos * XSSO 5.4 10344269bb5Schristos */ 10444269bb5Schristos enum { 10544269bb5Schristos /* some compilers promote 0x8000000 to long */ 10644269bb5Schristos PAM_SILENT = (-0x7fffffff - 1), 10744269bb5Schristos PAM_DISALLOW_NULL_AUTHTOK = 0x1, 10844269bb5Schristos PAM_ESTABLISH_CRED = 0x1, 10944269bb5Schristos PAM_DELETE_CRED = 0x2, 11044269bb5Schristos PAM_REINITIALIZE_CRED = 0x4, 11144269bb5Schristos PAM_REFRESH_CRED = 0x8, 11244269bb5Schristos PAM_PRELIM_CHECK = 0x1, 11344269bb5Schristos PAM_UPDATE_AUTHTOK = 0x2, 11444269bb5Schristos PAM_CHANGE_EXPIRED_AUTHTOK = 0x4 11544269bb5Schristos }; 11644269bb5Schristos 11744269bb5Schristos /* 11844269bb5Schristos * XSSO 5.5 11944269bb5Schristos */ 12072d8d6c3Schristos enum openpam_item_primitives { 12144269bb5Schristos PAM_SERVICE = 1, 12244269bb5Schristos PAM_USER = 2, 12344269bb5Schristos PAM_TTY = 3, 12444269bb5Schristos PAM_RHOST = 4, 12544269bb5Schristos PAM_CONV = 5, 12644269bb5Schristos PAM_AUTHTOK = 6, 12744269bb5Schristos PAM_OLDAUTHTOK = 7, 12844269bb5Schristos PAM_RUSER = 8, 12944269bb5Schristos PAM_USER_PROMPT = 9, 13044269bb5Schristos PAM_REPOSITORY = 10, 13144269bb5Schristos PAM_AUTHTOK_PROMPT = 11, /* OpenPAM extension */ 13244269bb5Schristos PAM_OLDAUTHTOK_PROMPT = 12, /* OpenPAM extension */ 13344269bb5Schristos PAM_HOST = 13, /* OpenPAM extension */ 1341ae23164Schristos PAM_SOCKADDR = 14, /* NetBSD extension */ 1351ae23164Schristos PAM_NUSER = 15, /* NetBSD extension */ 13644269bb5Schristos PAM_NUM_ITEMS /* OpenPAM extension */ 13744269bb5Schristos }; 13844269bb5Schristos 13944269bb5Schristos #ifdef __cplusplus 14044269bb5Schristos } 14144269bb5Schristos #endif 14244269bb5Schristos 14344269bb5Schristos #endif /* !SECURITY_PAM_CONSTANTS_H_INCLUDED */ 144