Index: head/contrib/openpam/lib/libpam/openpam_constants.c =================================================================== --- head/contrib/openpam/lib/libpam/openpam_constants.c (revision 288069) +++ head/contrib/openpam/lib/libpam/openpam_constants.c (revision 288070) @@ -1,145 +1,148 @@ /*- * Copyright (c) 2001-2003 Networks Associates Technology, Inc. * Copyright (c) 2004-2011 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and * Network Associates Laboratories, the Security Research Division of * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Id: openpam_constants.c 690 2013-08-15 13:22:51Z des $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "openpam_impl.h" const char *pam_err_name[PAM_NUM_ERRORS] = { "PAM_SUCCESS", "PAM_OPEN_ERR", "PAM_SYMBOL_ERR", "PAM_SERVICE_ERR", "PAM_SYSTEM_ERR", "PAM_BUF_ERR", "PAM_CONV_ERR", "PAM_PERM_DENIED", "PAM_MAXTRIES", "PAM_AUTH_ERR", "PAM_NEW_AUTHTOK_REQD", "PAM_CRED_INSUFFICIENT", "PAM_AUTHINFO_UNAVAIL", "PAM_USER_UNKNOWN", "PAM_CRED_UNAVAIL", "PAM_CRED_EXPIRED", "PAM_CRED_ERR", "PAM_ACCT_EXPIRED", "PAM_AUTHTOK_EXPIRED", "PAM_SESSION_ERR", "PAM_AUTHTOK_ERR", "PAM_AUTHTOK_RECOVERY_ERR", "PAM_AUTHTOK_LOCK_BUSY", "PAM_AUTHTOK_DISABLE_AGING", "PAM_NO_MODULE_DATA", "PAM_IGNORE", "PAM_ABORT", "PAM_TRY_AGAIN", "PAM_MODULE_UNKNOWN", "PAM_DOMAIN_UNKNOWN" }; const char *pam_item_name[PAM_NUM_ITEMS] = { "(NO ITEM)", "PAM_SERVICE", "PAM_USER", "PAM_TTY", "PAM_RHOST", "PAM_CONV", "PAM_AUTHTOK", "PAM_OLDAUTHTOK", "PAM_RUSER", "PAM_USER_PROMPT", "PAM_REPOSITORY", "PAM_AUTHTOK_PROMPT", "PAM_OLDAUTHTOK_PROMPT", "PAM_HOST", }; const char *pam_facility_name[PAM_NUM_FACILITIES] = { [PAM_ACCOUNT] = "account", [PAM_AUTH] = "auth", [PAM_PASSWORD] = "password", [PAM_SESSION] = "session", }; const char *pam_control_flag_name[PAM_NUM_CONTROL_FLAGS] = { [PAM_BINDING] = "binding", [PAM_OPTIONAL] = "optional", [PAM_REQUIRED] = "required", [PAM_REQUISITE] = "requisite", [PAM_SUFFICIENT] = "sufficient", }; const char *pam_func_name[PAM_NUM_PRIMITIVES] = { "pam_authenticate", "pam_setcred", "pam_acct_mgmt", "pam_open_session", "pam_close_session", "pam_chauthtok" }; const char *pam_sm_func_name[PAM_NUM_PRIMITIVES] = { "pam_sm_authenticate", "pam_sm_setcred", "pam_sm_acct_mgmt", "pam_sm_open_session", "pam_sm_close_session", "pam_sm_chauthtok" }; const char *openpam_policy_path[] = { "/etc/pam.d/", "/etc/pam.conf", "/usr/local/etc/pam.d/", "/usr/local/etc/pam.conf", NULL }; const char *openpam_module_path[] = { #ifdef OPENPAM_MODULES_DIRECTORY OPENPAM_MODULES_DIRECTORY, +#elif COMPAT_32BIT + "/usr/lib32", + "/usr/local/lib32", #else "/usr/lib", "/usr/local/lib", #endif NULL }; Index: head/lib/libpam/Makefile.inc =================================================================== --- head/lib/libpam/Makefile.inc (revision 288069) +++ head/lib/libpam/Makefile.inc (revision 288070) @@ -1,34 +1,33 @@ # Copyright 1998 Juniper Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ CFLAGS+= -DOPENPAM_DEBUG SHLIB_MAJOR= 5 -PAM_MOD_DIR= ${LIBDIR} STATIC_CFLAGS+= -DOPENPAM_STATIC_MODULES .include "../Makefile.inc" Index: head/lib/libpam/libpam/Makefile =================================================================== --- head/lib/libpam/libpam/Makefile (revision 288069) +++ head/lib/libpam/libpam/Makefile (revision 288070) @@ -1,185 +1,184 @@ #- # Copyright (c) 1998 Juniper Networks, Inc. # All rights reserved. # Copyright (c) 2002 Networks Associates Technology, Inc. # All rights reserved. # # Portions of this software was developed for the FreeBSD Project by # ThinkSec AS and NAI Labs, the Security Research Division of Network # Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 # ("CBOSS"), as part of the DARPA CHATS research program. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote # products derived from this software without specific prior written # permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ OPENPAM= ${.CURDIR}/../../../contrib/openpam .PATH: ${OPENPAM}/include ${OPENPAM}/lib/libpam ${OPENPAM}/doc/man LIB= pam MK_PROFILE=no SRCS= openpam_asprintf.c \ openpam_borrow_cred.c \ openpam_check_owner_perms.c \ openpam_configure.c \ openpam_constants.c \ openpam_dispatch.c \ openpam_dynamic.c \ openpam_features.c \ openpam_findenv.c \ openpam_free_data.c \ openpam_free_envlist.c \ openpam_get_feature.c \ openpam_get_option.c \ openpam_load.c \ openpam_log.c \ openpam_nullconv.c \ openpam_readline.c \ openpam_readlinev.c \ openpam_readword.c \ openpam_restore_cred.c \ openpam_set_feature.c \ openpam_set_option.c \ openpam_straddch.c \ openpam_strlcat.c \ openpam_strlcpy.c \ openpam_strlset.c \ openpam_subst.c \ openpam_ttyconv.c \ openpam_vasprintf.c \ pam_acct_mgmt.c \ pam_authenticate.c \ pam_chauthtok.c \ pam_close_session.c \ pam_end.c \ pam_error.c \ pam_get_authtok.c \ pam_get_data.c \ pam_get_item.c \ pam_get_user.c \ pam_getenv.c \ pam_getenvlist.c \ pam_info.c \ pam_open_session.c \ pam_prompt.c \ pam_putenv.c \ pam_set_data.c \ pam_set_item.c \ pam_setcred.c \ pam_setenv.c \ pam_start.c \ pam_strerror.c \ pam_verror.c \ pam_vinfo.c \ pam_vprompt.c # Local additions SRCS+= pam_debug_log.c MAN= openpam.3 \ openpam_borrow_cred.3 \ openpam_free_data.3 \ openpam_free_envlist.3 \ openpam_get_feature.3 \ openpam_get_option.3 \ openpam_log.3 \ openpam_nullconv.3 \ openpam_readline.3 \ openpam_readlinev.3 \ openpam_readword.3 \ openpam_restore_cred.3 \ openpam_set_feature.3 \ openpam_set_option.3 \ openpam_straddch.3 \ openpam_subst.3 \ openpam_ttyconv.3 \ pam.3 \ pam_acct_mgmt.3 \ pam_authenticate.3 \ pam_chauthtok.3 \ pam_close_session.3 \ pam_conv.3 \ pam_end.3 \ pam_error.3 \ pam_get_authtok.3 \ pam_get_data.3 \ pam_get_item.3 \ pam_get_user.3 \ pam_getenv.3 \ pam_getenvlist.3 \ pam_info.3 \ pam_open_session.3 \ pam_prompt.3 \ pam_putenv.3 \ pam_set_data.3 \ pam_set_item.3 \ pam_setcred.3 \ pam_setenv.3 \ pam_sm_acct_mgmt.3 \ pam_sm_authenticate.3 \ pam_sm_chauthtok.3 \ pam_sm_close_session.3 \ pam_sm_open_session.3 \ pam_sm_setcred.3 \ pam_start.3 \ pam_strerror.3 \ pam_verror.3 \ pam_vinfo.3 \ pam_vprompt.3 \ pam.conf.5 MLINKS= pam.conf.5 pam.d.5 CSTD?= c99 CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR} -CFLAGS+= -DOPENPAM_MODULES_DIRECTORY='"${PAM_MOD_DIR:C/\/*$//}/"' CFLAGS+= -DHAVE_DLFUNC=1 CFLAGS+= -DHAVE_FDLOPEN=1 CFLAGS+= -DHAVE_FPURGE=1 CFLAGS+= -DHAVE_STRLCAT=1 CFLAGS+= -DHAVE_STRLCPY=1 HEADERS= security/openpam.h \ security/openpam_attr.h \ security/openpam_version.h \ security/pam_appl.h \ security/pam_constants.h \ security/pam_modules.h \ security/pam_types.h \ ADD_HEADERS= security/pam_mod_misc.h # Headers INCS= ${HEADERS} ${ADD_HEADERS} INCSDIR= ${INCLUDEDIR}/security .include .if ${MK_TESTS} != "no" SUBDIR+= tests .endif .include