diff options
author | des <des@FreeBSD.org> | 2011-12-18 17:08:40 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2011-12-18 17:08:40 +0000 |
commit | 9a25ed673db408d79135934ee39ea88142f9ed4d (patch) | |
tree | 685cc74eea09898d5b7b579838e8705bcad03ac8 /lib/openpam_load.c | |
parent | 1b15b2817c3ed8a51b9d881b25bfa61bdfb0801a (diff) | |
download | FreeBSD-src-9a25ed673db408d79135934ee39ea88142f9ed4d.zip FreeBSD-src-9a25ed673db408d79135934ee39ea88142f9ed4d.tar.gz |
Vendor import of OpenPAM Lycopsida.
Diffstat (limited to 'lib/openpam_load.c')
-rw-r--r-- | lib/openpam_load.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/lib/openpam_load.c b/lib/openpam_load.c index 303f3f5..0eb8ea7 100644 --- a/lib/openpam_load.c +++ b/lib/openpam_load.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. - * Copyright (c) 2004-2007 Dag-Erling Smørgrav + * Copyright (c) 2004-2011 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -32,9 +32,13 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam_load.c 408 2007-12-21 11:36:24Z des $ + * $Id: openpam_load.c 491 2011-11-12 00:12:32Z des $ */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include <dlfcn.h> #include <stdlib.h> #include <string.h> @@ -43,24 +47,6 @@ #include "openpam_impl.h" -const char *_pam_func_name[PAM_NUM_PRIMITIVES] = { - "pam_authenticate", - "pam_setcred", - "pam_acct_mgmt", - "pam_open_session", - "pam_close_session", - "pam_chauthtok" -}; - -const char *_pam_sm_func_name[PAM_NUM_PRIMITIVES] = { - "pam_sm_authenticate", - "pam_sm_setcred", - "pam_sm_acct_mgmt", - "pam_sm_open_session", - "pam_sm_close_session", - "pam_sm_chauthtok" -}; - /* * Locate a matching dynamic or static module. */ @@ -122,10 +108,8 @@ openpam_destroy_chain(pam_chain_t *chain) return; openpam_destroy_chain(chain->next); chain->next = NULL; - while (chain->optc) { - --chain->optc; + while (chain->optc--) FREE(chain->optv[chain->optc]); - } FREE(chain->optv); openpam_release_module(chain->module); chain->module = NULL; |