summaryrefslogtreecommitdiff
path: root/libpam
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2006-01-22 15:40:58 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2006-01-22 15:40:58 +0000
commita5c4da8d631c538490c1920689d590c19a60f1d6 (patch)
tree9e3a8eec690a10f484114a915e1aea21a6af0e25 /libpam
parent5116bebb80ac7ee441c66b1a884d2653755dc4d9 (diff)
Relevant BUGIDs: none
Purpose of commit: bugfix Commit summary: --------------- Fix infrastructure and compile errors for PAM_STATIC (static modules): 2006-01-22 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_succeed_if/pam_succeed_if.c (pam_sm_acct_mgmt): Add support for static modules. * modules/pam_xauth/pam_xauth.c: Likewise. * libpam/pam_handlers.c (_pam_add_handler): Add pamh to _pam_open_static_handler call. * libpam/pam_static.c (_pam_open_static_handler): Add pamh as argument. * libpam/pam_private.h: Adjust prototype.
Diffstat (limited to 'libpam')
-rw-r--r--libpam/pam_handlers.c2
-rw-r--r--libpam/pam_private.h9
-rw-r--r--libpam/pam_static.c10
3 files changed, 11 insertions, 10 deletions
diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c
index 9035fb2f..62342fda 100644
--- a/libpam/pam_handlers.c
+++ b/libpam/pam_handlers.c
@@ -655,7 +655,7 @@ int _pam_add_handler(pam_handle_t *pamh
* This code should work even if no dynamic loading is available. */
if (success != PAM_SUCCESS) {
D(("_pam_add_handler: open static handler %s", mod_path));
- mod->dl_handle = _pam_open_static_handler(mod_path);
+ mod->dl_handle = _pam_open_static_handler(pamh, mod_path);
if (mod->dl_handle == NULL) {
D(("_pam_add_handler: unable to find static handler %s",
mod_path));
diff --git a/libpam/pam_private.h b/libpam/pam_private.h
index 5ab0f8c5..ad804791 100644
--- a/libpam/pam_private.h
+++ b/libpam/pam_private.h
@@ -225,7 +225,8 @@ typedef int (*servicefn)(pam_handle_t *, int, int, char **);
/* The next two in ../modules/_pam_static/pam_static.c */
/* 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);
/* Return pointer to function requested from static module */
@@ -299,7 +300,7 @@ if ((pamh) == NULL) { \
extern int _pam_auditlog(pam_handle_t *pamh, int action, int retval, int flags);
extern int _pam_audit_end(pam_handle_t *pamh, int pam_status);
#endif
-
+
/*
* Copyright (C) 1995 by Red Hat Software, Marc Ewing
* Copyright (c) 1996-8,2001 by Andrew G. Morgan <morgan@kernel.org>
@@ -318,13 +319,13 @@ extern int _pam_audit_end(pam_handle_t *pamh, int pam_status);
* 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
diff --git a/libpam/pam_static.c b/libpam/pam_static.c
index e2c6aac3..7ea4c81b 100644
--- a/libpam/pam_static.c
+++ b/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$
+ * created by Michael K. Johnson, johnsonm@redhat.com
*/
/* This whole file is only used for PAM_STATIC */
@@ -39,7 +38,8 @@ static struct pam_module *static_modules[] = {
*/
/* 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;