diff options
-rw-r--r-- | lib/libpam/modules/pam_krb5/pam_krb5.c | 17 | ||||
-rw-r--r-- | lib/libpam/modules/pam_ksu/pam_ksu.c | 2 | ||||
-rw-r--r-- | lib/libpam/modules/pam_login_access/pam_login_access.c | 6 | ||||
-rw-r--r-- | lib/libpam/modules/pam_securetty/pam_securetty.c | 2 | ||||
-rw-r--r-- | lib/libpam/modules/pam_ssh/pam_ssh.c | 8 | ||||
-rw-r--r-- | lib/libpam/modules/pam_unix/pam_unix.c | 2 |
6 files changed, 18 insertions, 19 deletions
diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index bd6032a..b1b97e5 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -105,8 +105,9 @@ 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 char *user, *pass; - const void *sourceuser, *service, *item; + const void *sourceuser, *service; char *principal, *princ_name, *ccache_name, luser[32], *srvdup; retval = pam_get_user(pamh, &user, USER_PROMPT); @@ -209,10 +210,6 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, if (retval != PAM_SUCCESS) goto cleanup2; - retval = pam_get_item(pamh, PAM_USER, &item); - if (retval != PAM_SUCCESS) - goto cleanup2; - PAM_LOG("PAM_USER Redone"); } @@ -284,7 +281,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, PAM_LOG("Credentials stash verified"); - retval = pam_get_data(pamh, "ccache", &item); + retval = pam_get_data(pamh, "ccache", &ccache_data); if (retval == PAM_SUCCESS) { krb5_cc_destroy(pam_context, ccache); PAM_VERBOSE_ERROR("Kerberos 5 error"); @@ -345,7 +342,8 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, struct passwd *pwd = NULL; int retval; const char *cache_name, *q; - const void *user, *cache_data; + const void *user; + void *cache_data; char *cache_name_buf = NULL, *p; uid_t euid; @@ -581,7 +579,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, krb5_ccache ccache; krb5_principal princ; int retval; - const void *user, *ccache_name; + const void *user; + void *ccache_name; retval = pam_get_item(pamh, PAM_USER, &user); if (retval != PAM_SUCCESS) @@ -711,7 +710,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, krbret = krb5_get_init_creds_password(pam_context, &creds, princ, pass, NULL, pamh, 0, "kadmin/changepw", &opts); if (krbret != 0) { - PAM_LOG("Error krb5_get_init_creds_password()", + PAM_LOG("Error krb5_get_init_creds_password(): %s", krb5_get_err_text(pam_context, krbret)); retval = PAM_AUTH_ERR; goto cleanup2; diff --git a/lib/libpam/modules/pam_ksu/pam_ksu.c b/lib/libpam/modules/pam_ksu/pam_ksu.c index 537e36b..80a395a 100644 --- a/lib/libpam/modules/pam_ksu/pam_ksu.c +++ b/lib/libpam/modules/pam_ksu/pam_ksu.c @@ -67,7 +67,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, pamret = pam_get_item(pamh, PAM_RUSER, &ruser); if (pamret != PAM_SUCCESS) return (pamret); - PAM_LOG("Got ruser: %s", ruser); + PAM_LOG("Got ruser: %s", (const char *)ruser); rv = krb5_init_context(&context); if (rv != 0) { PAM_LOG("krb5_init_context failed: %s", diff --git a/lib/libpam/modules/pam_login_access/pam_login_access.c b/lib/libpam/modules/pam_login_access/pam_login_access.c index 05ffe94..945d5eb 100644 --- a/lib/libpam/modules/pam_login_access/pam_login_access.c +++ b/lib/libpam/modules/pam_login_access/pam_login_access.c @@ -67,7 +67,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, if (user == NULL) return (PAM_SERVICE_ERR); - PAM_LOG("Got user: %s", user); + PAM_LOG("Got user: %s", (const char *)user); pam_err = pam_get_item(pamh, PAM_RHOST, &rhost); if (pam_err != PAM_SUCCESS) @@ -81,14 +81,14 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags __unused, if (rhost == NULL || *(const char *)rhost == '\0') { PAM_LOG("Checking login.access for user %s on tty %s", - user, tty); + (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", user, tty); } else { PAM_LOG("Checking login.access for user %s from host %s", - user, rhost); + (const char *)user, (const char *)rhost); if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", diff --git a/lib/libpam/modules/pam_securetty/pam_securetty.c b/lib/libpam/modules/pam_securetty/pam_securetty.c index edb6f3b..f58274a 100644 --- a/lib/libpam/modules/pam_securetty/pam_securetty.c +++ b/lib/libpam/modules/pam_securetty/pam_securetty.c @@ -77,7 +77,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh __unused, int flags __unused, if (pam_err != PAM_SUCCESS) return (pam_err); - PAM_LOG("Got TTY: %s", tty); + PAM_LOG("Got TTY: %s", (const char *)tty); /* Ignore any "/dev/" on the PAM_TTY item */ if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.c b/lib/libpam/modules/pam_ssh/pam_ssh.c index 24f2c27..719178c 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.c +++ b/lib/libpam/modules/pam_ssh/pam_ssh.c @@ -78,8 +78,8 @@ static const char *pam_ssh_keyfiles[] = { }; static const char *pam_ssh_agent = "/usr/bin/ssh-agent"; -static const char *pam_ssh_agent_argv[] = { "ssh_agent", "-s", NULL }; -static const char *pam_ssh_agent_envp[] = { NULL }; +static char *const pam_ssh_agent_argv[] = { "ssh_agent", "-s", NULL }; +static char *const pam_ssh_agent_envp[] = { NULL }; /* * Attempts to load a private key from the specified file in the specified @@ -322,7 +322,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) /* look for keys to add to it */ for (kfn = pam_ssh_keyfiles; *kfn != NULL; ++kfn) { - pam_err = pam_get_data(pamh, *kfn, (const void **)&psk); + pam_err = pam_get_data(pamh, *kfn, (void **)&psk); if (pam_err == PAM_SUCCESS && psk != NULL) { if (ssh_add_identity(ac, psk->key, psk->comment)) openpam_log(PAM_LOG_DEBUG, @@ -355,7 +355,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags __unused, { struct passwd *pwd; const char *user; - const void *data; + 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 26e4365..e45a777 100644 --- a/lib/libpam/modules/pam_unix/pam_unix.c +++ b/lib/libpam/modules/pam_unix/pam_unix.c @@ -262,7 +262,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, { #ifdef YP struct ypclnt *ypclnt; - const void *yp_domain, *yp_server; + void *yp_domain, *yp_server; #endif char salt[SALTSIZE + 1]; login_cap_t * lc; |