1/* $NetBSD$ */ 2 3/*- 4 * Copyright (c) 2001-2003 Networks Associates Technology, Inc. 5 * Copyright (c) 2004-2011 Dag-Erling Sm��rgrav 6 * All rights reserved. 7 * 8 * This software was developed for the FreeBSD Project by ThinkSec AS and 9 * Network Associates Laboratories, the Security Research Division of 10 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 11 * ("CBOSS"), as part of the DARPA CHATS research program. 12 * 13 * Redistribution and use in source and binary forms, with or without 14 * modification, are permitted provided that the following conditions 15 * are met: 16 * 1. Redistributions of source code must retain the above copyright 17 * notice, this list of conditions and the following disclaimer. 18 * 2. Redistributions in binary form must reproduce the above copyright 19 * notice, this list of conditions and the following disclaimer in the 20 * documentation and/or other materials provided with the distribution. 21 * 3. The name of the author may not be used to endorse or promote 22 * products derived from this software without specific prior written 23 * permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * Id: openpam_constants.c 491 2011-11-12 00:12:32Z des 38 */ 39 40#ifdef HAVE_CONFIG_H 41# include "config.h" 42#endif 43 44#include <security/pam_appl.h> 45 46#include "openpam_impl.h" 47 48const char *pam_err_name[PAM_NUM_ERRORS] = { 49 "PAM_SUCCESS", 50 "PAM_OPEN_ERR", 51 "PAM_SYMBOL_ERR", 52 "PAM_SERVICE_ERR", 53 "PAM_SYSTEM_ERR", 54 "PAM_BUF_ERR", 55 "PAM_CONV_ERR", 56 "PAM_PERM_DENIED", 57 "PAM_MAXTRIES", 58 "PAM_AUTH_ERR", 59 "PAM_NEW_AUTHTOK_REQD", 60 "PAM_CRED_INSUFFICIENT", 61 "PAM_AUTHINFO_UNAVAIL", 62 "PAM_USER_UNKNOWN", 63 "PAM_CRED_UNAVAIL", 64 "PAM_CRED_EXPIRED", 65 "PAM_CRED_ERR", 66 "PAM_ACCT_EXPIRED", 67 "PAM_AUTHTOK_EXPIRED", 68 "PAM_SESSION_ERR", 69 "PAM_AUTHTOK_ERR", 70 "PAM_AUTHTOK_RECOVERY_ERR", 71 "PAM_AUTHTOK_LOCK_BUSY", 72 "PAM_AUTHTOK_DISABLE_AGING", 73 "PAM_NO_MODULE_DATA", 74 "PAM_IGNORE", 75 "PAM_ABORT", 76 "PAM_TRY_AGAIN", 77 "PAM_MODULE_UNKNOWN", 78 "PAM_DOMAIN_UNKNOWN" 79}; 80 81const char *pam_item_name[PAM_NUM_ITEMS] = { 82 "(NO ITEM)", 83 "PAM_SERVICE", 84 "PAM_USER", 85 "PAM_TTY", 86 "PAM_RHOST", 87 "PAM_CONV", 88 "PAM_AUTHTOK", 89 "PAM_OLDAUTHTOK", 90 "PAM_RUSER", 91 "PAM_USER_PROMPT", 92 "PAM_REPOSITORY", 93 "PAM_AUTHTOK_PROMPT", 94 "PAM_OLDAUTHTOK_PROMPT", 95 "PAM_HOST", 96 "PAM_SOCKADDR", 97 "PAM_NUSER" 98}; 99 100const char *pam_facility_name[PAM_NUM_FACILITIES] = { 101 [PAM_ACCOUNT] = "account", 102 [PAM_AUTH] = "auth", 103 [PAM_PASSWORD] = "password", 104 [PAM_SESSION] = "session", 105}; 106 107const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = { 108 [PAM_BINDING] = "binding", 109 [PAM_OPTIONAL] = "optional", 110 [PAM_REQUIRED] = "required", 111 [PAM_REQUISITE] = "requisite", 112 [PAM_SUFFICIENT] = "sufficient", 113}; 114 115const char *pam_func_name[PAM_NUM_PRIMITIVES] = { 116 "pam_authenticate", 117 "pam_setcred", 118 "pam_acct_mgmt", 119 "pam_open_session", 120 "pam_close_session", 121 "pam_chauthtok" 122}; 123 124const char *pam_sm_func_name[PAM_NUM_PRIMITIVES] = { 125 "pam_sm_authenticate", 126 "pam_sm_setcred", 127 "pam_sm_acct_mgmt", 128 "pam_sm_open_session", 129 "pam_sm_close_session", 130 "pam_sm_chauthtok" 131}; 132