diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-12-11 15:51:03 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-12-11 15:51:03 +0000 |
| commit | 33b7c0d94cf11f187d0b7d96726bf090dddcd7c5 (patch) | |
| tree | 67c31ae08d9d96782689b726511c3e1f7b1b9547 /lib | |
| parent | 4911b12cba7ad8742d5b53eb482d604b0cf40a9b (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libpam/modules/pam_ksu/pam_ksu.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/libpam/modules/pam_ksu/pam_ksu.c b/lib/libpam/modules/pam_ksu/pam_ksu.c index a2ffe6155ec8..537e36b94d14 100644 --- a/lib/libpam/modules/pam_ksu/pam_ksu.c +++ b/lib/libpam/modules/pam_ksu/pam_ksu.c @@ -54,7 +54,8 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, { krb5_context context; krb5_principal su_principal; - const char *user, *ruser; + const char *user; + const void *ruser; char *su_principal_name; long rv; int pamret; @@ -63,7 +64,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags __unused, if (pamret != PAM_SUCCESS) return (pamret); PAM_LOG("Got user: %s", user); - pamret = pam_get_item(pamh, PAM_RUSER, (const void **)&ruser); + pamret = pam_get_item(pamh, PAM_RUSER, &ruser); if (pamret != PAM_SUCCESS) return (pamret); PAM_LOG("Got ruser: %s", ruser); @@ -128,13 +129,10 @@ auth_krb5(pam_handle_t *pamh, krb5_context context, const char *su_principal_nam if (prompt == NULL) return (PAM_BUF_ERR); pass = NULL; - (void)pam_get_item(pamh, PAM_AUTHTOK, (const void **)&pass); + pamret = pam_get_authtok(pamh, PAM_AUTHTOK, &pass, prompt); free(prompt); - if (pass == NULL) { - pamret = pam_get_authtok(pamh, PAM_AUTHTOK, &pass, prompt); - if (pamret != PAM_SUCCESS) - return (pamret); - } + if (pamret != PAM_SUCCESS) + return (pamret); rv = krb5_get_init_creds_password(context, &creds, su_principal, pass, NULL, NULL, 0, NULL, &gic_opt); if (rv != 0) { |
