summaryrefslogtreecommitdiff
path: root/lib/libpam/openpam_dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpam/openpam_dispatch.c')
-rw-r--r--lib/libpam/openpam_dispatch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libpam/openpam_dispatch.c b/lib/libpam/openpam_dispatch.c
index 5fa068f8e261..391ce8050d8f 100644
--- a/lib/libpam/openpam_dispatch.c
+++ b/lib/libpam/openpam_dispatch.c
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002-2003 Networks Associates Technology, Inc.
- * Copyright (c) 2004-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2004-2015 Dag-Erling Smørgrav
* All rights reserved.
*
* This software was developed for the FreeBSD Project by ThinkSec AS and
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: openpam_dispatch.c 807 2014-09-09 09:41:32Z des $
+ * $Id: openpam_dispatch.c 913 2017-01-21 15:11:12Z des $
*/
#ifdef HAVE_CONFIG_H
@@ -41,6 +41,8 @@
#include <sys/param.h>
+#include <stdint.h>
+
#include <security/pam_appl.h>
#include "openpam_impl.h"
@@ -67,8 +69,6 @@ openpam_dispatch(pam_handle_t *pamh,
int debug;
ENTER();
- if (pamh == NULL)
- RETURNC(PAM_SYSTEM_ERR);
/* prevent recursion */
if (pamh->current != NULL) {
@@ -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],
@@ -128,7 +128,7 @@ openpam_dispatch(pam_handle_t *pamh,
if (r == PAM_IGNORE)
continue;
- if (r == PAM_SUCCESS) {
+ if (r == PAM_SUCCESS) {
++nsuccess;
/*
* For pam_setcred() and pam_chauthtok() with the