diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-07 15:38:31 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-07 15:38:31 +1100 |
commit | 037a0dc0835bb5a442bdcbeecdd5baed723f0b45 (patch) | |
tree | d02954d57ac437fd036e3e9544f24559ca8f0f0f /sshconnect.c | |
parent | eabf3417bc73ca9546a3ed489cd809ffdf303853 (diff) | |
download | openssh-git-037a0dc0835bb5a442bdcbeecdd5baed723f0b45.tar.gz |
- Merged more OpenBSD changes:
- [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c]
move atomicio into it's own file. wrap all socket write()s which
were doing write(sock, buf, len) != len, with atomicio() calls.
- [auth-skey.c]
fd leak
- [authfile.c]
properly name fd variable
- [channels.c]
display great hatred towards strcpy
- [pty.c pty.h sshd.c]
use openpty() if it exists (it does on BSD4_4)
- [tildexpand.c]
check for ~ expansion past MAXPATHLEN
- Modified helper.c to use new atomicio function.
- Reformat Makefile a little
- Moved RC4 routines from rc4.[ch] into helper.c
- Added autoconf code to detect /dev/ptmx (Solaris) and /dev/ptc (AIX)
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sshconnect.c b/sshconnect.c index 593eade0..e6175f11 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$Id: sshconnect.c,v 1.16 1999/12/06 00:47:29 damien Exp $"); +RCSID("$Id: sshconnect.c,v 1.17 1999/12/07 04:38:32 damien Exp $"); #ifdef HAVE_OPENSSL #include <openssl/bn.h> @@ -537,7 +537,7 @@ try_rsa_authentication(const char *authfile) if (!load_private_key(authfile, "", private_key, NULL)) { char buf[300]; snprintf(buf, sizeof buf, "Enter passphrase for RSA key '%.100s': ", - comment); + comment); if (!options.batch_mode) passphrase = read_passphrase(buf, 0); else { @@ -1036,8 +1036,8 @@ ssh_exchange_identification() /* Send our own protocol version identification. */ snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", - PROTOCOL_MAJOR, PROTOCOL_MINOR, SSH_VERSION); - if (write(connection_out, buf, strlen(buf)) != strlen(buf)) + PROTOCOL_MAJOR, PROTOCOL_MINOR, SSH_VERSION); + if (atomicio(write, connection_out, buf, strlen(buf)) != strlen(buf)) fatal("write: %.100s", strerror(errno)); } @@ -1292,10 +1292,10 @@ ssh_login(int host_key_valid, char prompt[1024]; char *fp = fingerprint(host_key->e, host_key->n); snprintf(prompt, sizeof(prompt), - "The authenticity of host '%.200s' can't be established.\n" - "Key fingerprint is %d %s.\n" - "Are you sure you want to continue connecting (yes/no)? ", - host, BN_num_bits(host_key->n), fp); + "The authenticity of host '%.200s' can't be established.\n" + "Key fingerprint is %d %s.\n" + "Are you sure you want to continue connecting (yes/no)? ", + host, BN_num_bits(host_key->n), fp); if (!read_yes_or_no(prompt, -1)) fatal("Aborted by user!\n"); } @@ -1599,8 +1599,9 @@ ssh_login(int host_key_valid, if ((supported_authentications & (1 << SSH_AUTH_PASSWORD)) && options.password_authentication && !options.batch_mode) { char prompt[80]; + snprintf(prompt, sizeof(prompt), "%.30s@%.40s's password: ", - server_user, host); + server_user, host); if (try_password_authentication(prompt)) return; } |