=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshconnect.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- src/usr.bin/ssh/sshconnect.c 1999/12/01 16:51:19 1.44 +++ src/usr.bin/ssh/sshconnect.c 1999/12/06 20:15:30 1.45 @@ -8,7 +8,7 @@ */ #include "includes.h" -RCSID("$Id: sshconnect.c,v 1.44 1999/12/01 16:51:19 markus Exp $"); +RCSID("$Id: sshconnect.c,v 1.45 1999/12/06 20:15:30 deraadt Exp $"); #include #include "xmalloc.h" @@ -531,7 +531,7 @@ 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 { @@ -1030,8 +1030,8 @@ /* 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)); } @@ -1286,10 +1286,10 @@ 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"); } @@ -1593,8 +1593,9 @@ 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; }