diff options
author | Damien Miller <djm@mindrot.org> | 2000-03-09 21:27:49 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-03-09 21:27:49 +1100 |
commit | 98c7ad60ec5725d91da9f9f6d26cd9fe477398c0 (patch) | |
tree | 104c3e3474be8e308d05e22d79715c833c6cf837 /sshconnect.c | |
parent | 1a07ebd4d8d39c6814bbd84c1aec4ebf2bd005a2 (diff) |
- OpenBSD CVS updates to v1.2.3
[ssh.h atomicio.c]
- int atomicio -> ssize_t (for alpha). ok deraadt@
[auth-rsa.c]
- delay MD5 computation until client sends response, free() early, cleanup.
[cipher.c]
- void* -> unsigned char*, ok niels@
[hostfile.c]
- remove unused variable 'len'. fix comments.
- remove unused variable
[log-client.c log-server.c]
- rename a cpp symbol, to avoid param.h collision
[packet.c]
- missing xfree()
- getsockname() requires initialized tolen; andy@guildsoftware.com
- use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
from Holger.Trapp@Informatik.TU-Chemnitz.DE
[pty.c pty.h]
- register cleanup for pty earlier. move code for pty-owner handling to
pty.c ok provos@, dugsong@
[readconf.c]
- turn off x11-fwd for the client, too.
[rsa.c]
- PKCS#1 padding
[scp.c]
- allow '.' in usernames; from jedgar@fxp.org
[servconf.c]
- typo: ignore_user_known_hosts int->flag; naddy@mips.rhein-neckar.de
- sync with sshd_config
[ssh-keygen.c]
- enable ssh-keygen -l -f ~/.ssh/known_hosts, ok deraadt@
[ssh.1]
- Change invalid 'CHAT' loglevel to 'VERBOSE'
[ssh.c]
- suppress AAAA query host when '-4' is used; from shin@nd.net.fujitsu.co.jp
- turn off x11-fwd for the client, too.
[sshconnect.c]
- missing xfree()
- retry rresvport_af(), too. from sumikawa@ebina.hitachi.co.jp.
- read error vs. "Connection closed by remote host"
[sshd.8]
- ie. -> i.e.,
- do not link to a commercial page..
- sync with sshd_config
[sshd.c]
- no need for poll.h; from bright@wintelcom.net
- log with level log() not fatal() if peer behaves badly.
- don't panic if client behaves strange. ok deraadt@
- make no-port-forwarding for RSA keys deny both -L and -R style fwding
- delay close() of pty until the pty has been chowned back to root
- oops, fix comment, too.
- missing xfree()
- move XAUTHORITY to subdir. ok dugsong@. fixes debian bug #57907, too.
(http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57907)
- register cleanup for pty earlier. move code for pty-owner handling to
pty.c ok provos@, dugsong@
- create x11 cookie file
- fix pr 1113, fclose() -> pclose(), todo: remote popen()
- version 1.2.3
- Cleaned up
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sshconnect.c b/sshconnect.c index 5e2a34497..c4c9aee1f 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "includes.h" | 10 | #include "includes.h" |
11 | RCSID("$OpenBSD: sshconnect.c,v 1.53 2000/01/18 09:42:17 markus Exp $"); | 11 | RCSID("$OpenBSD: sshconnect.c,v 1.56 2000/02/18 08:50:33 markus Exp $"); |
12 | 12 | ||
13 | #ifdef HAVE_OPENSSL | 13 | #ifdef HAVE_OPENSSL |
14 | #include <openssl/bn.h> | 14 | #include <openssl/bn.h> |
@@ -156,8 +156,9 @@ ssh_create_socket(uid_t original_real_uid, int privileged, int family) | |||
156 | int p = IPPORT_RESERVED - 1; | 156 | int p = IPPORT_RESERVED - 1; |
157 | sock = rresvport_af(&p, family); | 157 | sock = rresvport_af(&p, family); |
158 | if (sock < 0) | 158 | if (sock < 0) |
159 | fatal("rresvport: af=%d %.100s", family, strerror(errno)); | 159 | error("rresvport: af=%d %.100s", family, strerror(errno)); |
160 | debug("Allocated local port %d.", p); | 160 | else |
161 | debug("Allocated local port %d.", p); | ||
161 | } else { | 162 | } else { |
162 | /* | 163 | /* |
163 | * Just create an ordinary socket on arbitrary port. We use | 164 | * Just create an ordinary socket on arbitrary port. We use |
@@ -891,6 +892,7 @@ try_skey_authentication() | |||
891 | log("WARNING: Encryption is disabled! " | 892 | log("WARNING: Encryption is disabled! " |
892 | "Reponse will be transmitted in clear text."); | 893 | "Reponse will be transmitted in clear text."); |
893 | fprintf(stderr, "%s\n", challenge); | 894 | fprintf(stderr, "%s\n", challenge); |
895 | xfree(challenge); | ||
894 | fflush(stderr); | 896 | fflush(stderr); |
895 | for (i = 0; i < options.number_of_password_prompts; i++) { | 897 | for (i = 0; i < options.number_of_password_prompts; i++) { |
896 | if (i != 0) | 898 | if (i != 0) |
@@ -960,8 +962,11 @@ ssh_exchange_identification() | |||
960 | 962 | ||
961 | /* Read other side\'s version identification. */ | 963 | /* Read other side\'s version identification. */ |
962 | for (i = 0; i < sizeof(buf) - 1; i++) { | 964 | for (i = 0; i < sizeof(buf) - 1; i++) { |
963 | if (read(connection_in, &buf[i], 1) != 1) | 965 | int len = read(connection_in, &buf[i], 1); |
966 | if (len < 0) | ||
964 | fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); | 967 | fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); |
968 | if (len != 1) | ||
969 | fatal("ssh_exchange_identification: Connection closed by remote host"); | ||
965 | if (buf[i] == '\r') { | 970 | if (buf[i] == '\r') { |
966 | buf[i] = '\n'; | 971 | buf[i] = '\n'; |
967 | buf[i + 1] = 0; | 972 | buf[i + 1] = 0; |