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 /hostfile.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 'hostfile.c')
-rw-r--r-- | hostfile.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/hostfile.c b/hostfile.c index 831ac592f..ea92fa048 100644 --- a/hostfile.c +++ b/hostfile.c | |||
@@ -14,13 +14,13 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$OpenBSD: hostfile.c,v 1.11 2000/01/04 00:07:59 markus Exp $"); | 17 | RCSID("$OpenBSD: hostfile.c,v 1.13 2000/02/18 10:20:20 markus Exp $"); |
18 | 18 | ||
19 | #include "packet.h" | 19 | #include "packet.h" |
20 | #include "ssh.h" | 20 | #include "ssh.h" |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Reads a multiple-precision integer in hex from the buffer, and advances | 23 | * Reads a multiple-precision integer in decimal from the buffer, and advances |
24 | * the pointer. The integer must already be initialized. This function is | 24 | * the pointer. The integer must already be initialized. This function is |
25 | * permitted to modify the buffer. This leaves *cpp to point just beyond the | 25 | * permitted to modify the buffer. This leaves *cpp to point just beyond the |
26 | * last processed (and maybe modified) character. Note that this may modify | 26 | * last processed (and maybe modified) character. Note that this may modify |
@@ -31,26 +31,23 @@ int | |||
31 | auth_rsa_read_bignum(char **cpp, BIGNUM * value) | 31 | auth_rsa_read_bignum(char **cpp, BIGNUM * value) |
32 | { | 32 | { |
33 | char *cp = *cpp; | 33 | char *cp = *cpp; |
34 | int len, old; | 34 | int old; |
35 | 35 | ||
36 | /* Skip any leading whitespace. */ | 36 | /* Skip any leading whitespace. */ |
37 | for (; *cp == ' ' || *cp == '\t'; cp++) | 37 | for (; *cp == ' ' || *cp == '\t'; cp++) |
38 | ; | 38 | ; |
39 | 39 | ||
40 | /* Check that it begins with a hex digit. */ | 40 | /* Check that it begins with a decimal digit. */ |
41 | if (*cp < '0' || *cp > '9') | 41 | if (*cp < '0' || *cp > '9') |
42 | return 0; | 42 | return 0; |
43 | 43 | ||
44 | /* Save starting position. */ | 44 | /* Save starting position. */ |
45 | *cpp = cp; | 45 | *cpp = cp; |
46 | 46 | ||
47 | /* Move forward until all hex digits skipped. */ | 47 | /* Move forward until all decimal digits skipped. */ |
48 | for (; *cp >= '0' && *cp <= '9'; cp++) | 48 | for (; *cp >= '0' && *cp <= '9'; cp++) |
49 | ; | 49 | ; |
50 | 50 | ||
51 | /* Compute the length of the hex number. */ | ||
52 | len = cp - *cpp; | ||
53 | |||
54 | /* Save the old terminating character, and replace it by \0. */ | 51 | /* Save the old terminating character, and replace it by \0. */ |
55 | old = *cp; | 52 | old = *cp; |
56 | *cp = 0; | 53 | *cp = 0; |
@@ -179,7 +176,7 @@ check_host_in_hostfile(const char *filename, const char *host, | |||
179 | FILE *f; | 176 | FILE *f; |
180 | char line[8192]; | 177 | char line[8192]; |
181 | int linenum = 0; | 178 | int linenum = 0; |
182 | unsigned int bits, kbits, hostlen; | 179 | unsigned int kbits, hostlen; |
183 | char *cp, *cp2; | 180 | char *cp, *cp2; |
184 | HostStatus end_return; | 181 | HostStatus end_return; |
185 | 182 | ||
@@ -198,9 +195,6 @@ check_host_in_hostfile(const char *filename, const char *host, | |||
198 | */ | 195 | */ |
199 | end_return = HOST_NEW; | 196 | end_return = HOST_NEW; |
200 | 197 | ||
201 | /* size of modulus 'n' */ | ||
202 | bits = BN_num_bits(n); | ||
203 | |||
204 | /* Go trough the file. */ | 198 | /* Go trough the file. */ |
205 | while (fgets(line, sizeof(line), f)) { | 199 | while (fgets(line, sizeof(line), f)) { |
206 | cp = line; | 200 | cp = line; |