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
This commit is contained in:
Dag-Erling Smørgrav 2002-02-04 23:36:07 +00:00
parent 4166f73f32
commit e683738206
1 changed files with 1 additions and 5 deletions

View File

@ -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,