summaryrefslogtreecommitdiff
path: root/libpam/pam_dispatch.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2008-12-03 14:16:33 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2008-12-03 14:16:33 +0000
commitf326d04ccd16631d57134487e56bb73074f0dd0e (patch)
treebe55fce45e805e98057c1920a5f0ebaffa2b6650 /libpam/pam_dispatch.c
parentde63f0160c57494553e400aca215ffe316e946b7 (diff)
Relevant BUGIDs:
Purpose of commit: new feature Commit summary: --------------- 2008-12-03 Thorsten Kukuk <kukuk@suse.de> * doc/man/Makefile.am: Add pam_get_authtok.3.xml. * doc/man/pam_get_authtok.3.xml: New. * libpam/Makefile.am: Add pam_get_authtok.c. * libpam/libpam.map: Export pam_get_authtok. * libpam/pam_get_authtok.c: New. * libpam/pam_private.h: Add mod_argc and mod_argv to pam_handle. * libpam_include/security/pam_ext.h: Add pam_get_authtok prototype. * modules/pam_cracklib/pam_cracklib.c: Use pam_get_authtok. * modules/pam_pwhistory/pam_pwhistory.c: Likewise. * po/POTFILES.in: Add libpam/pam_get_authtok.c. * xtests/tst-pam_cracklib1.c: Adjust error codes. * modules/pam_timestamp/Makefile.am: Remove hmactest.c from EXTRA_DIST. * po/*.po: Regenerated.
Diffstat (limited to 'libpam/pam_dispatch.c')
-rw-r--r--libpam/pam_dispatch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libpam/pam_dispatch.c b/libpam/pam_dispatch.c
index fa4e5ed4..42482573 100644
--- a/libpam/pam_dispatch.c
+++ b/libpam/pam_dispatch.c
@@ -87,7 +87,7 @@ static int _pam_dispatch_aux(pam_handle_t *pamh, int flags, struct handler *h,
}
/* remember state if we are entering a substack */
- if (prev_level < stack_level) {
+ if (prev_level < stack_level) {
substates[stack_level].impression = impression;
substates[stack_level].status = status;
}
@@ -105,8 +105,12 @@ static int _pam_dispatch_aux(pam_handle_t *pamh, int flags, struct handler *h,
} else {
D(("passing control to module..."));
pamh->mod_name=h->mod_name;
+ pamh->mod_argc = h->argc;
+ pamh->mod_argv = h->argv;
retval = h->func(pamh, flags, h->argc, h->argv);
pamh->mod_name=NULL;
+ pamh->mod_argc = 0;
+ pamh->mod_argv = NULL;
D(("module returned: %s", pam_strerror(pamh, retval)));
}
@@ -286,7 +290,7 @@ static int _pam_dispatch_aux(pam_handle_t *pamh, int flags, struct handler *h,
}
}
continue;
-
+
decision_made: /* by getting here we have made a decision */
while (h->next != NULL && h->next->stack_level >= stack_level) {
h = h->next;