FreeBSD Bugzilla – Attachment 9395 Details for
Bug 19251
[PATCH] pam_ssh broken by OpenSSH DSA changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.86 KB, created by
ajk
on 2000-06-13 22:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
ajk
Created:
2000-06-13 22:30:01 UTC
Size:
2.86 KB
patch
obsolete
>Index: pam_ssh.c >=================================================================== >RCS file: /var/cvs/src/crypto/openssh/pam_ssh/pam_ssh.c,v >retrieving revision 1.6 >diff -u -r1.6 pam_ssh.c >--- pam_ssh.c 2000/05/26 01:58:49 1.6 >+++ pam_ssh.c 2000/05/27 02:09:29 >@@ -45,10 +45,14 @@ > #include <security/pam_modules.h> > #include <security/pam_mod_misc.h> > >+#include <openssl/dsa.h> >+#include <openssl/rsa.h> >+ > #include "includes.h" >-#include "rsa.h" > #include "ssh.h" >+#include "key.h" > #include "authfd.h" >+#include "authfile.h" > > #define MODULE_NAME "pam_ssh" > #define NEED_PASSPHRASE "Need passphrase for %s (%s).\nEnter passphrase: " >@@ -56,10 +60,10 @@ > > > void >-rsa_cleanup(pam_handle_t *pamh, void *data, int error_status) >+key_cleanup(pam_handle_t *pamh, void *data, int error_status) > { > if (data) >- RSA_free(data); >+ key_free(data); > } > > >@@ -205,11 +209,11 @@ > char *comment_priv; /* on private key */ > char *comment_pub; /* on public key */ > char *identity; /* user's identity file */ >- RSA *key; /* user's private key */ >+ Key *key; /* user's private key */ > int options; /* module options */ > const char *pass; /* passphrase */ > char *prompt; /* passphrase prompt */ >- RSA *public_key; /* user's public key */ >+ Key *public_key; /* user's public key */ > const PASSWD *pwent; /* user's passwd entry */ > PASSWD *pwent_keep; /* our own copy */ > int retval; /* from calls */ >@@ -235,8 +239,8 @@ > * Fail unless we can load the public key. Change to the > * owner's UID to appease load_public_key(). > */ >- key = RSA_new(); >- public_key = RSA_new(); >+ key = key_new(KEY_RSA); >+ public_key = key_new(KEY_RSA); > saved_uid = getuid(); > (void)setreuid(pwent->pw_uid, saved_uid); > retval = load_public_key(identity, public_key, &comment_pub); >@@ -245,7 +249,7 @@ > free(identity); > return PAM_AUTH_ERR; > } >- RSA_free(public_key); >+ key_free(public_key); > /* build the passphrase prompt */ > retval = asprintf(&prompt, NEED_PASSPHRASE, identity, comment_pub); > free(comment_pub); >@@ -276,8 +280,8 @@ > * phase. > */ > if ((retval = pam_set_data(pamh, "ssh_private_key", key, >- rsa_cleanup)) != PAM_SUCCESS) { >- RSA_free(key); >+ key_cleanup)) != PAM_SUCCESS) { >+ key_free(key); > free(comment_priv); > return retval; > } >@@ -329,7 +333,7 @@ > char *env_end; /* end of env */ > char *env_file; /* to store env */ > FILE *env_fp; /* env_file handle */ >- RSA *key; /* user's private key */ >+ Key *key; /* user's private key */ > FILE *pipe; /* ssh-agent handle */ > const PASSWD *pwent; /* user's passwd entry */ > int retval; /* from calls */ >@@ -439,7 +443,7 @@ > env_destroy(ssh_env); > return PAM_SESSION_ERR; > } >- retval = ssh_add_identity(ac, key, comment); >+ retval = ssh_add_identity(ac, key->rsa, comment); > ssh_close_authentication_connection(ac); > env_swap(ssh_env, 0); > return retval ? PAM_SUCCESS : PAM_SESSION_ERR;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19251
: 9395