From e6837382069038f21b5f0322f3fba77789a46285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 4 Feb 2002 23:36:07 +0000 Subject: [PATCH] Behave more like Solaris when faced with an empty chain, or a chain that lists modules that don't implement the required functionality. Sponsored by: DARPA, NAI Labs git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@33 185d5e19-27fe-0310-9dcf-9bff6b9f3609 --- lib/openpam_dispatch.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/openpam_dispatch.c b/lib/openpam_dispatch.c index cbabb0e..9c7c287 100644 --- a/lib/openpam_dispatch.c +++ b/lib/openpam_dispatch.c @@ -87,16 +87,12 @@ openpam_dispatch(pam_handle_t *pamh, return (PAM_SYSTEM_ERR); } - /* fail if the chain is empty */ - if (chain == NULL) - return (PAM_SYSTEM_ERR); - /* execute */ for (err = fail = 0; chain != NULL; chain = chain->next) { if (chain->module->func[primitive] == NULL) { openpam_log(PAM_LOG_ERROR, "%s: no %s()", chain->module->path, _pam_sm_func_name[primitive]); - r = PAM_SYMBOL_ERR; + continue; } else { pamh->current = chain; r = (chain->module->func[primitive])(pamh, flags,