Log a debug message before calling the service function.

Accept PAM_SUCCESS and PAM_ABORT as valid return codes, even though
the normal code path will not call _openpam_check_error_code() if
the module returns one of them.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@53 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2002-02-13 00:43:57 +00:00
parent f8ad159142
commit 0ebca05841
1 changed files with 6 additions and 3 deletions

View File

@ -89,6 +89,8 @@ openpam_dispatch(pam_handle_t *pamh,
/* execute */
for (err = fail = 0; chain != NULL; chain = chain->next) {
openpam_log(PAM_LOG_DEBUG, "calling %s() in %s",
_pam_sm_func_name[primitive], chain->module->path);
if (chain->module->func[primitive] == NULL) {
openpam_log(PAM_LOG_ERROR, "%s: no %s()",
chain->module->path, _pam_sm_func_name[primitive]);
@ -151,11 +153,12 @@ static void
_openpam_check_error_code(int primitive, int r)
{
/* common error codes */
if (r == PAM_SERVICE_ERR ||
r == PAM_BUF_ERR ||
if (r == PAM_SUCCESS ||
r == PAM_SERVICE_ERR ||
r == PAM_BUF_ERR ||
r == PAM_CONV_ERR ||
r == PAM_PERM_DENIED)
r == PAM_PERM_DENIED ||
r == PAM_ABORT)
return;
/* specific error codes */