diff options
author | dim <dim@FreeBSD.org> | 2015-01-28 18:13:52 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-28 18:13:52 +0000 |
commit | 021a8716741b99922b09ba1f48d3fe7ce69e309f (patch) | |
tree | 1b32c4d5d515c19c086fb0829fa0acfabe628c67 /contrib/openpam | |
parent | 56bc48c419f4d3081c91ff02e5f63bf97e26f6a8 (diff) | |
download | FreeBSD-src-021a8716741b99922b09ba1f48d3fe7ce69e309f.zip FreeBSD-src-021a8716741b99922b09ba1f48d3fe7ce69e309f.tar.gz |
Apply changeset 854 from upstream openpam (by Dag-Erling Smørgrav):
Silence all remaining qual-cast warnings except in the test suite.
Diffstat (limited to 'contrib/openpam')
-rw-r--r-- | contrib/openpam/CREDITS | 1 | ||||
-rw-r--r-- | contrib/openpam/configure.ac | 2 | ||||
-rw-r--r-- | contrib/openpam/lib/libpam/openpam_dispatch.c | 2 | ||||
-rw-r--r-- | contrib/openpam/modules/pam_unix/pam_unix.c | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index a2fc7d3..c14f7ea 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -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> diff --git a/contrib/openpam/configure.ac b/contrib/openpam/configure.ac index 1412b7a..bf7f905 100644 --- a/contrib/openpam/configure.ac +++ b/contrib/openpam/configure.ac @@ -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"]) diff --git a/contrib/openpam/lib/libpam/openpam_dispatch.c b/contrib/openpam/lib/libpam/openpam_dispatch.c index 5fa068f..0cff631 100644 --- a/contrib/openpam/lib/libpam/openpam_dispatch.c +++ b/contrib/openpam/lib/libpam/openpam_dispatch.c @@ -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], diff --git a/contrib/openpam/modules/pam_unix/pam_unix.c b/contrib/openpam/modules/pam_unix/pam_unix.c index ad7dd1b..f76651d 100644 --- a/contrib/openpam/modules/pam_unix/pam_unix.c +++ b/contrib/openpam/modules/pam_unix/pam_unix.c @@ -74,7 +74,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, #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, int flags, 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); |