From 64dbe1a7af6a722e3eea4fdb87732d060ebcc8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 21 Dec 2007 12:00:16 +0000 Subject: [PATCH] Adjust for OpenPAM Hydrangea. --- lib/libpam/libpam/Makefile | 1 + lib/libpam/modules/pam_krb5/pam_krb5.c | 6 +++--- lib/libpam/modules/pam_ssh/pam_ssh.c | 6 +++--- lib/libpam/modules/pam_unix/pam_unix.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/libpam/libpam/Makefile b/lib/libpam/libpam/Makefile index 6c819409743b..8b07458bf4b1 100644 --- a/lib/libpam/libpam/Makefile +++ b/lib/libpam/libpam/Makefile @@ -139,6 +139,7 @@ CFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR} CFLAGS+= -DOPENPAM_MODULES_DIR='"${PAM_MOD_DIR:C/\/*$//}/"' HEADERS= security/openpam.h \ + security/openpam_attr.h \ security/openpam_version.h \ security/pam_appl.h \ security/pam_constants.h \ diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index 0ed57f93208a..b56e0a3c17e1 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -106,7 +106,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, krb5_get_init_creds_opt opts; struct passwd *pwd; int retval; - void *ccache_data; + const void *ccache_data; const char *user, *pass; const void *sourceuser, *service; char *principal, *princ_name, *ccache_name, luser[32], *srvdup; @@ -347,7 +347,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, int retval; const char *cache_name, *q; const void *user; - void *cache_data; + const void *cache_data; char *cache_name_buf = NULL, *p; uid_t euid; @@ -589,7 +589,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, krb5_principal princ; int retval; const void *user; - void *ccache_name; + const void *ccache_name; retval = pam_get_item(pamh, PAM_USER, &user); if (retval != PAM_SUCCESS) diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.c b/lib/libpam/modules/pam_ssh/pam_ssh.c index 095f90eae1b1..25c63ca7585a 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.c +++ b/lib/libpam/modules/pam_ssh/pam_ssh.c @@ -306,9 +306,9 @@ static int pam_ssh_add_keys_to_agent(pam_handle_t *pamh) { AuthenticationConnection *ac; - struct pam_ssh_key *psk; + const struct pam_ssh_key *psk; const char **kfn; - void *item; + const void *item; char **envlist, **env; int pam_err; @@ -361,7 +361,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags __unused, { struct passwd *pwd; const char *user; - void *data; + const void *data; int pam_err; /* no keys, no work */ diff --git a/lib/libpam/modules/pam_unix/pam_unix.c b/lib/libpam/modules/pam_unix/pam_unix.c index 46b5f4729bc6..ce309a79e234 100644 --- a/lib/libpam/modules/pam_unix/pam_unix.c +++ b/lib/libpam/modules/pam_unix/pam_unix.c @@ -268,7 +268,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, { #ifdef YP struct ypclnt *ypclnt; - void *yp_domain, *yp_server; + const void *yp_domain, *yp_server; #endif char salt[SALTSIZE + 1]; login_cap_t * lc;