diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index a2fc7d3407e..c14f7ea3ff9 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -21,6 +21,7 @@ ideas: Christos Zoulas Daniel Richard G. Darren J. Moffat + Dimitry Andric Dmitry V. Levin Don Lewis Emmanuel Dreyfus diff --git a/contrib/openpam/configure.ac b/contrib/openpam/configure.ac index 1412b7a8e30..bf7f905cdcd 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 5fa068f8e26..0cff6318485 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 ad7dd1b3a77..f76651d084d 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);