From 0ebca058418e14917e80ffdcc70897ffca9217cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 13 Feb 2002 00:43:57 +0000 Subject: [PATCH] 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 --- lib/openpam_dispatch.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/openpam_dispatch.c b/lib/openpam_dispatch.c index 9c7c287..c8f7d1e 100644 --- a/lib/openpam_dispatch.c +++ b/lib/openpam_dispatch.c @@ -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 */