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:
parent
f8ad159142
commit
0ebca05841
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue