diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-01-18 02:04:35 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-01-18 02:04:35 +0000 |
commit | bf555ba6210532f8598ff0f96961e82bcda3f09b (patch) | |
tree | 2b90d1026f300a2dd478c654e5e47ada304c3ffe /ssh-keyscan.c | |
parent | 01fa6380e815a37ac5ffcf03b04c93d7b52ce765 (diff) |
NOTE: This update changes the RSA key generation. *NEW RSA KEYS
NEED TO BE GENERATED* =) Refer to to entry "2001/01/16 19:20:06"
for more details.
20010118
- (bal) Super Sized OpenBSD Resync
- markus@cvs.openbsd.org 2001/01/11 22:14:20 GMT 2001 by markus
[sshd.c]
maxfd+1
- markus@cvs.openbsd.org 2001/01/13 17:59:18
[ssh-keygen.1]
small ssh-keygen manpage cleanup; stevesk@pobox.com
- markus@cvs.openbsd.org 2001/01/13 18:03:07
[scp.c ssh-keygen.c sshd.c]
getopt() returns -1 not EOF; stevesk@pobox.com
- markus@cvs.openbsd.org 2001/01/13 18:06:54
[ssh-keyscan.c]
use SSH_DEFAULT_PORT; from stevesk@pobox.com
- markus@cvs.openbsd.org 2001/01/13 18:12:47
[ssh-keyscan.c]
free() -> xfree(); fix memory leak; from stevesk@pobox.com
- markus@cvs.openbsd.org 2001/01/13 18:14:13
[ssh-add.c]
typo, from stevesk@sweden.hp.com
- markus@cvs.openbsd.org 2001/01/13 18:32:50
[packet.c session.c ssh.c sshconnect.c sshd.c]
split out keepalive from packet_interactive (from dale@accentre.com)
set IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT for ssh2, too.
- markus@cvs.openbsd.org 2001/01/13 18:36:45
[packet.c packet.h]
reorder, typo
- markus@cvs.openbsd.org 2001/01/13 18:38:00
[auth-options.c]
fix comment
- markus@cvs.openbsd.org 2001/01/13 18:43:31
[session.c]
Wall
- markus@cvs.openbsd.org 2001/01/13 19:14:08
[clientloop.h clientloop.c ssh.c]
move callback to headerfile
- markus@cvs.openbsd.org 2001/01/15 21:40:10
[ssh.c]
use log() instead of stderr
- markus@cvs.openbsd.org 2001/01/15 21:43:51
[dh.c]
use error() not stderr!
- markus@cvs.openbsd.org 2001/01/15 21:45:29
[sftp-server.c]
rename must fail if newpath exists, debug off by default
- markus@cvs.openbsd.org 2001/01/15 21:46:38
[sftp-server.c]
readable long listing for sftp-server, ok deraadt@
- markus@cvs.openbsd.org 2001/01/16 19:20:06
[key.c ssh-rsa.c]
make "ssh-rsa" key format for ssh2 confirm to the ietf-drafts; from
galb@vandyke.com. note that you have to delete older ssh2-rsa keys,
since they are in the wrong format, too. they must be removed from
.ssh/authorized_keys2 and .ssh/known_hosts2, etc.
(cd; grep -v ssh-rsa .ssh/authorized_keys2 > TMP && mv TMP
.ssh/authorized_keys2) additionally, we now check that
BN_num_bits(rsa->n) >= 768.
- markus@cvs.openbsd.org 2001/01/16 20:54:27
[sftp-server.c]
remove some statics. simpler handles; idea from nisse@lysator.liu.se
- deraadt@cvs.openbsd.org 2001/01/16 23:58:08
[bufaux.c radix.c sshconnect.h sshconnect1.c]
indent
- (bal) Added bsd-strmode.[ch] since some non-OpenBSD platforms may
be missing such feature.
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r-- | ssh-keyscan.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 5d5427aad..69b029b05 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c | |||
@@ -8,7 +8,7 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "includes.h" | 10 | #include "includes.h" |
11 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.7 2001/01/08 22:03:23 markus Exp $"); | 11 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.9 2001/01/13 18:12:47 markus Exp $"); |
12 | 12 | ||
13 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) | 13 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) |
14 | #include <sys/queue.h> | 14 | #include <sys/queue.h> |
@@ -31,7 +31,6 @@ static int argno = 1; /* Number of argument currently being parsed */ | |||
31 | 31 | ||
32 | int family = AF_UNSPEC; /* IPv4, IPv6 or both */ | 32 | int family = AF_UNSPEC; /* IPv4, IPv6 or both */ |
33 | 33 | ||
34 | #define PORT 22 | ||
35 | #define MAXMAXFD 256 | 34 | #define MAXMAXFD 256 |
36 | 35 | ||
37 | /* The number of seconds after which to give up on a TCP connection */ | 36 | /* The number of seconds after which to give up on a TCP connection */ |
@@ -103,7 +102,7 @@ Linebuf_alloc(const char *filename, void (*errfun) (const char *,...)) | |||
103 | if (filename) { | 102 | if (filename) { |
104 | lb->filename = filename; | 103 | lb->filename = filename; |
105 | if (!(lb->stream = fopen(filename, "r"))) { | 104 | if (!(lb->stream = fopen(filename, "r"))) { |
106 | free(lb); | 105 | xfree(lb); |
107 | if (errfun) | 106 | if (errfun) |
108 | (*errfun) ("%s: %s\n", filename, strerror(errno)); | 107 | (*errfun) ("%s: %s\n", filename, strerror(errno)); |
109 | return (NULL); | 108 | return (NULL); |
@@ -116,7 +115,7 @@ Linebuf_alloc(const char *filename, void (*errfun) (const char *,...)) | |||
116 | if (!(lb->buf = malloc(lb->size = LINEBUF_SIZE))) { | 115 | if (!(lb->buf = malloc(lb->size = LINEBUF_SIZE))) { |
117 | if (errfun) | 116 | if (errfun) |
118 | (*errfun) ("linebuf (%s): malloc failed\n", lb->filename); | 117 | (*errfun) ("linebuf (%s): malloc failed\n", lb->filename); |
119 | free(lb); | 118 | xfree(lb); |
120 | return (NULL); | 119 | return (NULL); |
121 | } | 120 | } |
122 | lb->errfun = errfun; | 121 | lb->errfun = errfun; |
@@ -128,8 +127,8 @@ static inline void | |||
128 | Linebuf_free(Linebuf * lb) | 127 | Linebuf_free(Linebuf * lb) |
129 | { | 128 | { |
130 | fclose(lb->stream); | 129 | fclose(lb->stream); |
131 | free(lb->buf); | 130 | xfree(lb->buf); |
132 | free(lb); | 131 | xfree(lb); |
133 | } | 132 | } |
134 | 133 | ||
135 | static inline void | 134 | static inline void |
@@ -298,7 +297,7 @@ tcpconnect(char *host) | |||
298 | char strport[NI_MAXSERV]; | 297 | char strport[NI_MAXSERV]; |
299 | int gaierr, s = -1; | 298 | int gaierr, s = -1; |
300 | 299 | ||
301 | snprintf(strport, sizeof strport, "%d", PORT); | 300 | snprintf(strport, sizeof strport, "%d", SSH_DEFAULT_PORT); |
302 | memset(&hints, 0, sizeof(hints)); | 301 | memset(&hints, 0, sizeof(hints)); |
303 | hints.ai_family = family; | 302 | hints.ai_family = family; |
304 | hints.ai_socktype = SOCK_STREAM; | 303 | hints.ai_socktype = SOCK_STREAM; |
@@ -335,7 +334,7 @@ conalloc(char *iname, char *oname) | |||
335 | do { | 334 | do { |
336 | name = xstrsep(&namelist, ","); | 335 | name = xstrsep(&namelist, ","); |
337 | if (!name) { | 336 | if (!name) { |
338 | free(namebase); | 337 | xfree(namebase); |
339 | return (-1); | 338 | return (-1); |
340 | } | 339 | } |
341 | } while ((s = tcpconnect(name)) < 0); | 340 | } while ((s = tcpconnect(name)) < 0); |
@@ -368,10 +367,10 @@ confree(int s) | |||
368 | close(s); | 367 | close(s); |
369 | if (s >= maxfd || fdcon[s].c_status == CS_UNUSED) | 368 | if (s >= maxfd || fdcon[s].c_status == CS_UNUSED) |
370 | fatal("confree: attempt to free bad fdno %d", s); | 369 | fatal("confree: attempt to free bad fdno %d", s); |
371 | free(fdcon[s].c_namebase); | 370 | xfree(fdcon[s].c_namebase); |
372 | free(fdcon[s].c_output_name); | 371 | xfree(fdcon[s].c_output_name); |
373 | if (fdcon[s].c_status == CS_KEYS) | 372 | if (fdcon[s].c_status == CS_KEYS) |
374 | free(fdcon[s].c_data); | 373 | xfree(fdcon[s].c_data); |
375 | fdcon[s].c_status = CS_UNUSED; | 374 | fdcon[s].c_status = CS_UNUSED; |
376 | TAILQ_REMOVE(&tq, &fdcon[s], c_link); | 375 | TAILQ_REMOVE(&tq, &fdcon[s], c_link); |
377 | FD_CLR(s, &read_wait); | 376 | FD_CLR(s, &read_wait); |
@@ -395,11 +394,11 @@ conrecycle(int s) | |||
395 | char *iname, *oname; | 394 | char *iname, *oname; |
396 | 395 | ||
397 | iname = xstrdup(c->c_namelist); | 396 | iname = xstrdup(c->c_namelist); |
398 | oname = c->c_output_name; | 397 | oname = xstrdup(c->c_output_name); |
399 | c->c_output_name = NULL;/* prevent it from being freed */ | ||
400 | confree(s); | 398 | confree(s); |
401 | ret = conalloc(iname, oname); | 399 | ret = conalloc(iname, oname); |
402 | free(iname); | 400 | xfree(iname); |
401 | xfree(oname); | ||
403 | return (ret); | 402 | return (ret); |
404 | } | 403 | } |
405 | 404 | ||