diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 12:48:14 -0800 |
---|---|---|
committer | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 12:48:14 -0800 |
commit | d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c (patch) | |
tree | ba5654cffacfd2002eefc5bc3764a7971afff1dc /Linux-PAM/libpam/pam_static.c | |
parent | 4c51da22e068907adb7857d50f5109a467c94d7c (diff) | |
parent | 7cbfa335c57d068d59508c844f3957165cccfb9b (diff) | |
download | pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.tar.gz pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.tar.bz2 pam-d5b06b67bbeeed7c05c0eb2e05d6a972ad050d1c.zip |
New upstream version 0.99.7.1
Diffstat (limited to 'Linux-PAM/libpam/pam_static.c')
-rw-r--r-- | Linux-PAM/libpam/pam_static.c | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/Linux-PAM/libpam/pam_static.c b/Linux-PAM/libpam/pam_static.c index 5a2b5a5d..511026d4 100644 --- a/Linux-PAM/libpam/pam_static.c +++ b/Linux-PAM/libpam/pam_static.c @@ -1,8 +1,7 @@ -/* pam_static.c -- static module loading helper functions */ - -/* created by Michael K. Johnson, johnsonm@redhat.com +/* + * pam_static.c -- static module loading helper functions * - * $Id: pam_static.c,v 1.1.1.1 2000/06/20 22:11:21 agmorgan Exp $ + * created by Michael K. Johnson, johnsonm@redhat.com */ /* This whole file is only used for PAM_STATIC */ @@ -15,31 +14,15 @@ #include "pam_private.h" -/* - * Need to include pointers to static modules; this was built by each - * of the modules that register... - */ - -#include "../modules/_static_module_list" - -/* - * and here is a structure that connects libpam to the above static - * modules - */ - -static struct pam_module *static_modules[] = { - -#include "../modules/_static_module_entry" - - NULL -}; +#include "pam_static_modules.h" /* * and now for the functions */ /* Return pointer to data structure used to define a static module */ -struct pam_module * _pam_open_static_handler(const char *path) +struct pam_module * +_pam_open_static_handler (pam_handle_t *pamh, const char *path) { int i; const char *clpath = path; @@ -47,7 +30,7 @@ struct pam_module * _pam_open_static_handler(const char *path) if (strchr(clpath, '/')) { /* ignore path and leading "/" */ - clpath = strrchr(lpath, '/') + 1; + clpath = strrchr(path, '/') + 1; } /* create copy to muck with (must free before return) */ lpath = _pam_strdup(clpath); @@ -68,8 +51,7 @@ struct pam_module * _pam_open_static_handler(const char *path) } if (static_modules[i] == NULL) { - _pam_system_log(NULL, NULL, LOG_ERR, "no static module named %s", - lpath); + pam_syslog (pamh, LOG_ERR, "no static module named %s", lpath); } free(lpath); @@ -102,7 +84,11 @@ voidfunc *_pam_get_static_sym(struct pam_module *mod, const char *symname) { return ((voidfunc *)NULL); } -#endif /* PAM_STATIC */ +#else /* ! PAM_STATIC */ + +typedef int blarg; + +#endif /* ! PAM_STATIC */ /* * Copyright (C) 1995 by Red Hat Software, Michael K. Johnson @@ -120,13 +106,13 @@ voidfunc *_pam_get_static_sym(struct pam_module *mod, const char *symname) { * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. - * + * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU Public License, in which case the provisions of the GPL are * required INSTEAD OF the above restrictions. (This clause is * necessary due to a potential bad interaction between the GPL and * the restrictions contained in a BSD-style copyright.) - * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |