Date: Sat, 16 Jan 2016 19:48:03 +0000 (UTC) From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294192 - in stable/10: contrib/openpam contrib/openpam/bin contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc/man contrib/openpam/include contrib/openpam/include/security c... Message-ID: <201601161948.u0GJm36N088592@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Sat Jan 16 19:48:03 2016 New Revision: 294192 URL: https://svnweb.freebsd.org/changeset/base/294192 Log: MFH (r262530): fix is_upper() predicate (almost two years late...) MFH (r271614): remove incorrect svn properties MFH (r274145): cast-qual bugs in tests MFH (r288070): restore correct module search path semantics Also merge upstream r854, committed to head as part of r280031, which fixes cast-qual bugs in libpam itself. Added: stable/10/contrib/openpam/t/t_openpam_ctype.c - copied, changed from r262530, head/contrib/openpam/t/t_openpam_ctype.c Modified: stable/10/contrib/openpam/CREDITS (contents, props changed) stable/10/contrib/openpam/configure.ac (contents, props changed) stable/10/contrib/openpam/lib/libpam/openpam_constants.c stable/10/contrib/openpam/lib/libpam/openpam_ctype.h stable/10/contrib/openpam/lib/libpam/openpam_dispatch.c stable/10/contrib/openpam/modules/pam_unix/pam_unix.c (contents, props changed) stable/10/contrib/openpam/t/Makefile.am stable/10/contrib/openpam/t/t_openpam_readlinev.c stable/10/contrib/openpam/t/t_openpam_readword.c stable/10/lib/libpam/Makefile.inc stable/10/lib/libpam/libpam/Makefile Directory Properties: stable/10/ (props changed) stable/10/contrib/openpam/HISTORY (props changed) stable/10/contrib/openpam/INSTALL (props changed) stable/10/contrib/openpam/LICENSE (props changed) stable/10/contrib/openpam/Makefile.am (props changed) stable/10/contrib/openpam/Makefile.in (props changed) stable/10/contrib/openpam/README (props changed) stable/10/contrib/openpam/RELNOTES (props changed) stable/10/contrib/openpam/aclocal.m4 (props changed) stable/10/contrib/openpam/autogen.sh (props changed) stable/10/contrib/openpam/bin/Makefile.am (props changed) stable/10/contrib/openpam/bin/Makefile.in (props changed) stable/10/contrib/openpam/bin/su/Makefile.am (props changed) stable/10/contrib/openpam/bin/su/Makefile.in (props changed) stable/10/contrib/openpam/bin/su/su.c (props changed) stable/10/contrib/openpam/compile (props changed) stable/10/contrib/openpam/config.guess (props changed) stable/10/contrib/openpam/config.h.in (props changed) stable/10/contrib/openpam/config.sub (props changed) stable/10/contrib/openpam/configure (props changed) stable/10/contrib/openpam/depcomp (props changed) stable/10/contrib/openpam/doc/Makefile.am (props changed) stable/10/contrib/openpam/doc/Makefile.in (props changed) stable/10/contrib/openpam/doc/man/Makefile.am (props changed) stable/10/contrib/openpam/doc/man/Makefile.in (props changed) stable/10/contrib/openpam/doc/man/openpam.3 (props changed) stable/10/contrib/openpam/doc/man/openpam.man (props changed) stable/10/contrib/openpam/doc/man/openpam_borrow_cred.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_free_data.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_free_envlist.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_get_option.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_log.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_nullconv.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_readline.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_restore_cred.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_set_option.3 (props changed) stable/10/contrib/openpam/doc/man/openpam_ttyconv.3 (props changed) stable/10/contrib/openpam/doc/man/pam.3 (props changed) stable/10/contrib/openpam/doc/man/pam.conf.5 (props changed) stable/10/contrib/openpam/doc/man/pam.man (props changed) stable/10/contrib/openpam/doc/man/pam_acct_mgmt.3 (props changed) stable/10/contrib/openpam/doc/man/pam_authenticate.3 (props changed) stable/10/contrib/openpam/doc/man/pam_chauthtok.3 (props changed) stable/10/contrib/openpam/doc/man/pam_close_session.3 (props changed) stable/10/contrib/openpam/doc/man/pam_conv.3 (props changed) stable/10/contrib/openpam/doc/man/pam_end.3 (props changed) stable/10/contrib/openpam/doc/man/pam_error.3 (props changed) stable/10/contrib/openpam/doc/man/pam_get_authtok.3 (props changed) stable/10/contrib/openpam/doc/man/pam_get_data.3 (props changed) stable/10/contrib/openpam/doc/man/pam_get_item.3 (props changed) stable/10/contrib/openpam/doc/man/pam_get_user.3 (props changed) stable/10/contrib/openpam/doc/man/pam_getenv.3 (props changed) stable/10/contrib/openpam/doc/man/pam_getenvlist.3 (props changed) stable/10/contrib/openpam/doc/man/pam_info.3 (props changed) stable/10/contrib/openpam/doc/man/pam_open_session.3 (props changed) stable/10/contrib/openpam/doc/man/pam_prompt.3 (props changed) stable/10/contrib/openpam/doc/man/pam_putenv.3 (props changed) stable/10/contrib/openpam/doc/man/pam_set_data.3 (props changed) stable/10/contrib/openpam/doc/man/pam_set_item.3 (props changed) stable/10/contrib/openpam/doc/man/pam_setcred.3 (props changed) stable/10/contrib/openpam/doc/man/pam_setenv.3 (props changed) stable/10/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 (props changed) stable/10/contrib/openpam/doc/man/pam_sm_authenticate.3 (props changed) stable/10/contrib/openpam/doc/man/pam_sm_chauthtok.3 (props changed) stable/10/contrib/openpam/doc/man/pam_sm_close_session.3 (props changed) stable/10/contrib/openpam/doc/man/pam_sm_open_session.3 (props changed) stable/10/contrib/openpam/doc/man/pam_sm_setcred.3 (props changed) stable/10/contrib/openpam/doc/man/pam_start.3 (props changed) stable/10/contrib/openpam/doc/man/pam_strerror.3 (props changed) stable/10/contrib/openpam/doc/man/pam_verror.3 (props changed) stable/10/contrib/openpam/doc/man/pam_vinfo.3 (props changed) stable/10/contrib/openpam/doc/man/pam_vprompt.3 (props changed) stable/10/contrib/openpam/include/Makefile.am (props changed) stable/10/contrib/openpam/include/Makefile.in (props changed) stable/10/contrib/openpam/include/security/Makefile.am (props changed) stable/10/contrib/openpam/include/security/Makefile.in (props changed) stable/10/contrib/openpam/include/security/openpam.h (props changed) stable/10/contrib/openpam/include/security/openpam_attr.h (props changed) stable/10/contrib/openpam/include/security/openpam_version.h (props changed) stable/10/contrib/openpam/include/security/pam_appl.h (props changed) stable/10/contrib/openpam/include/security/pam_constants.h (props changed) stable/10/contrib/openpam/include/security/pam_modules.h (props changed) stable/10/contrib/openpam/include/security/pam_types.h (props changed) stable/10/contrib/openpam/install-sh (props changed) stable/10/contrib/openpam/ltmain.sh (props changed) stable/10/contrib/openpam/misc/gendoc.pl (props changed) stable/10/contrib/openpam/missing (props changed) stable/10/contrib/openpam/modules/Makefile.am (props changed) stable/10/contrib/openpam/modules/Makefile.in (props changed) stable/10/contrib/openpam/modules/pam_deny/Makefile.am (props changed) stable/10/contrib/openpam/modules/pam_deny/Makefile.in (props changed) stable/10/contrib/openpam/modules/pam_deny/pam_deny.c (props changed) stable/10/contrib/openpam/modules/pam_permit/Makefile.am (props changed) stable/10/contrib/openpam/modules/pam_permit/Makefile.in (props changed) stable/10/contrib/openpam/modules/pam_permit/pam_permit.c (props changed) stable/10/contrib/openpam/modules/pam_unix/Makefile.am (props changed) stable/10/contrib/openpam/modules/pam_unix/Makefile.in (props changed) Modified: stable/10/contrib/openpam/CREDITS ============================================================================== --- stable/10/contrib/openpam/CREDITS Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/CREDITS Sat Jan 16 19:48:03 2016 (r294192) @@ -21,6 +21,7 @@ ideas: Christos Zoulas <christos@netbsd.org> Daniel Richard G. <skunk@iskunk.org> Darren J. Moffat <darren.moffat@sun.com> + Dimitry Andric <dim@freebsd.org> Dmitry V. Levin <ldv@altlinux.org> Don Lewis <truckman@freebsd.org> Emmanuel Dreyfus <manu@netbsd.org> @@ -32,9 +33,9 @@ ideas: Hubert Feyrer <hubert@feyrer.de> Jason Evans <jasone@freebsd.org> Joe Marcus Clarke <marcus@freebsd.org> - Juli Mallett <jmallett@freebsd.org> - Ankita Pal <pal.ankita.ankita@gmail.com> Jörg Sonnenberger <joerg@britannica.bec.de> + Juli Mallett <jmallett@freebsd.org> + Larry Baird <lab@gta.com> Maëlle Lesage <lesage.maelle@gmail.com> Mark Murray <markm@freebsd.org> Matthias Drochner <drochner@netbsd.org> Modified: stable/10/contrib/openpam/configure.ac ============================================================================== --- stable/10/contrib/openpam/configure.ac Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/configure.ac Sat Jan 16 19:48:03 2016 (r294192) @@ -110,7 +110,7 @@ AC_SUBST(CRYPTO_LIBS) AC_ARG_ENABLE([developer-warnings], AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]), - [CFLAGS="${CFLAGS} -Wall -Wextra"]) + [CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual"]) AC_ARG_ENABLE([debugging-symbols], AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]), [CFLAGS="${CFLAGS} -O0 -g -fno-inline"]) Modified: stable/10/contrib/openpam/lib/libpam/openpam_constants.c ============================================================================== --- stable/10/contrib/openpam/lib/libpam/openpam_constants.c Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/lib/libpam/openpam_constants.c Sat Jan 16 19:48:03 2016 (r294192) @@ -137,6 +137,9 @@ const char *openpam_policy_path[] = { 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", Modified: stable/10/contrib/openpam/lib/libpam/openpam_ctype.h ============================================================================== --- stable/10/contrib/openpam/lib/libpam/openpam_ctype.h Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/lib/libpam/openpam_ctype.h Sat Jan 16 19:48:03 2016 (r294192) @@ -39,10 +39,18 @@ (ch >= '0' && ch <= '9') /* + * Evaluates to non-zero if the argument is a hex digit. + */ +#define is_xdigit(ch) \ + ((ch >= '0' && ch <= '9') || \ + (ch >= 'a' && ch <= 'f') || \ + (ch >= 'A' && ch <= 'F')) + +/* * Evaluates to non-zero if the argument is an uppercase letter. */ #define is_upper(ch) \ - (ch >= 'A' && ch <= 'A') + (ch >= 'A' && ch <= 'Z') /* * Evaluates to non-zero if the argument is a lowercase letter. Modified: stable/10/contrib/openpam/lib/libpam/openpam_dispatch.c ============================================================================== --- stable/10/contrib/openpam/lib/libpam/openpam_dispatch.c Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/lib/libpam/openpam_dispatch.c Sat Jan 16 19:48:03 2016 (r294192) @@ -117,7 +117,7 @@ openpam_dispatch(pam_handle_t *pamh, openpam_log(PAM_LOG_LIBDEBUG, "calling %s() in %s", pam_sm_func_name[primitive], chain->module->path); r = (chain->module->func[primitive])(pamh, flags, - chain->optc, (const char **)chain->optv); + chain->optc, (const char **)(intptr_t)chain->optv); pamh->current = NULL; openpam_log(PAM_LOG_LIBDEBUG, "%s: %s(): %s", chain->module->path, pam_sm_func_name[primitive], Modified: stable/10/contrib/openpam/modules/pam_unix/pam_unix.c ============================================================================== --- stable/10/contrib/openpam/modules/pam_unix/pam_unix.c Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/modules/pam_unix/pam_unix.c Sat Jan 16 19:48:03 2016 (r294192) @@ -74,7 +74,7 @@ pam_sm_authenticate(pam_handle_t *pamh, #endif struct passwd *pwd; const char *user; - char *crypt_password, *password; + const char *crypt_password, *password; int pam_err, retry; (void)argc; @@ -98,7 +98,7 @@ pam_sm_authenticate(pam_handle_t *pamh, for (retry = 0; retry < 3; ++retry) { #ifdef OPENPAM pam_err = pam_get_authtok(pamh, PAM_AUTHTOK, - (const char **)&password, NULL); + &password, NULL); #else resp = NULL; pam_err = (*conv->conv)(1, &msgp, &resp, conv->appdata_ptr); Modified: stable/10/contrib/openpam/t/Makefile.am ============================================================================== --- stable/10/contrib/openpam/t/Makefile.am Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/t/Makefile.am Sat Jan 16 19:48:03 2016 (r294192) @@ -6,6 +6,7 @@ noinst_HEADERS = t.h # tests TESTS = +TESTS += t_openpam_ctype TESTS += t_openpam_readword TESTS += t_openpam_readlinev check_PROGRAMS = $(TESTS) Copied and modified: stable/10/contrib/openpam/t/t_openpam_ctype.c (from r262530, head/contrib/openpam/t/t_openpam_ctype.c) ============================================================================== --- head/contrib/openpam/t/t_openpam_ctype.c Wed Feb 26 17:14:02 2014 (r262530, copy source) +++ stable/10/contrib/openpam/t/t_openpam_ctype.c Sat Jan 16 19:48:03 2016 (r294192) @@ -94,7 +94,7 @@ T_OC(pfcs) * Boilerplate */ -const struct t_test *t_plan[] = { +static const struct t_test *t_plan[] = { T(t_oc_digit), T(t_oc_xdigit), T(t_oc_upper), Modified: stable/10/contrib/openpam/t/t_openpam_readlinev.c ============================================================================== --- stable/10/contrib/openpam/t/t_openpam_readlinev.c Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/t/t_openpam_readlinev.c Sat Jan 16 19:48:03 2016 (r294192) @@ -255,7 +255,7 @@ T_FUNC(unterminated_line, "unterminated * Boilerplate */ -const struct t_test *t_plan[] = { +static const struct t_test *t_plan[] = { T(empty_input), T(empty_line), T(unterminated_empty_line), Modified: stable/10/contrib/openpam/t/t_openpam_readword.c ============================================================================== --- stable/10/contrib/openpam/t/t_openpam_readword.c Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/contrib/openpam/t/t_openpam_readword.c Sat Jan 16 19:48:03 2016 (r294192) @@ -823,7 +823,7 @@ T_FUNC(escaped_double_quote_within_doubl * Boilerplate */ -const struct t_test *t_plan[] = { +static const struct t_test *t_plan[] = { T(empty_input), T(empty_line), T(single_whitespace), Modified: stable/10/lib/libpam/Makefile.inc ============================================================================== --- stable/10/lib/libpam/Makefile.inc Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/lib/libpam/Makefile.inc Sat Jan 16 19:48:03 2016 (r294192) @@ -27,7 +27,6 @@ CFLAGS+= -DOPENPAM_DEBUG SHLIB_MAJOR= 5 -PAM_MOD_DIR= ${LIBDIR} STATIC_CFLAGS+= -DOPENPAM_STATIC_MODULES Modified: stable/10/lib/libpam/libpam/Makefile ============================================================================== --- stable/10/lib/libpam/libpam/Makefile Sat Jan 16 19:25:16 2016 (r294191) +++ stable/10/lib/libpam/libpam/Makefile Sat Jan 16 19:48:03 2016 (r294192) @@ -155,7 +155,6 @@ MLINKS= pam.conf.5 pam.d.5 CSTD?= c99 CFLAGS+= -I${.CURDIR} -I${OPENPAM}/include CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR} -CFLAGS+= -DOPENPAM_MODULES_DIR='"${PAM_MOD_DIR:C/\/*$//}/"' CFLAGS+= -DHAVE_DLFUNC=1 CFLAGS+= -DHAVE_FDLOPEN=1 CFLAGS+= -DHAVE_FPURGE=1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601161948.u0GJm36N088592>