diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2001-01-22 06:07:28 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2001-01-22 06:07:28 +0000 |
commit | 9fb9393ede4ee9d43ff841557f95ed2af7d1a15f (patch) | |
tree | 34a3323fac5906ceb5aa54b5d482090bdaba47c0 /libpam/pam_dispatch.c | |
parent | e6d5049a8d484fb7a764a125d830b23f59a0c685 (diff) | |
download | pam-9fb9393ede4ee9d43ff841557f95ed2af7d1a15f.tar.gz pam-9fb9393ede4ee9d43ff841557f95ed2af7d1a15f.tar.bz2 pam-9fb9393ede4ee9d43ff841557f95ed2af7d1a15f.zip |
Relevant BUGIDs: 129027, 128576
Purpose of commit: new feature + documentation
Commit summary:
---------------
Cleaned up the handling of AUTHTOK items and pam_[gs]et_data() functions.
Added more clear documentation about the pam_[gs]et_item() functions to
the pam_appl and pam_modules programmer guides.
Diffstat (limited to 'libpam/pam_dispatch.c')
-rw-r--r-- | libpam/pam_dispatch.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libpam/pam_dispatch.c b/libpam/pam_dispatch.c index 285f3316..02325665 100644 --- a/libpam/pam_dispatch.c +++ b/libpam/pam_dispatch.c @@ -195,7 +195,12 @@ int _pam_dispatch(pam_handle_t *pamh, int flags, int choice) int retval; _pam_boolean resumed; - IF_NO_PAMH("_pam_dispatch",pamh,PAM_SYSTEM_ERR); + IF_NO_PAMH("_pam_dispatch", pamh, PAM_SYSTEM_ERR); + + if (__PAM_FROM_MODULE(pamh)) { + D(("called from a module!?")); + return PAM_SYSTEM_ERR; + } /* Load all modules, resolve all symbols */ @@ -265,10 +270,14 @@ int _pam_dispatch(pam_handle_t *pamh, int flags, int choice) resumed = PAM_FALSE; } + __PAM_TO_MODULE(pamh); + /* call the list of module functions */ retval = _pam_dispatch_aux(pamh, flags, h, resumed); resumed = PAM_FALSE; + __PAM_TO_APP(pamh); + /* Should we recall where to resume next time? */ if (retval == PAM_INCOMPLETE) { D(("module [%d] returned PAM_INCOMPLETE")); |