- Merged OpenBSD CVS changes:
- [auth-krb4.c auth-passwd.c auth-skey.c ssh.
move skey-auth from auth-passwd.c to auth-s
- [auth-rsa.c]
warn only about mismatch if key is _used_
warn about keysize-mismatch with log() not
channels.c readconf.c readconf.h ssh.c ssh.
ports are u_short
- [hostfile.c]
indent, shorter warning
- [nchan.c]
use error() for internal errors
- [packet.c]
set loglevel for SSH_MSG_DISCONNECT to log(
serverloop.c
indent
- [ssh-add.1 ssh-add.c ssh.h]
document , reasonable default
- [ssh.1]
CheckHostIP is not available for connects v
- [sshconnect.c]
typo
easier to read client code for passwd and s
turn of checkhostip for proxy connects, sin
diff --git a/ssh.c b/ssh.c
index 21147f7..c0d61f8 100644
--- a/ssh.c
+++ b/ssh.c
@@ -11,7 +11,7 @@
*/
#include "includes.h"
-RCSID("$Id: ssh.c,v 1.12 1999/11/25 00:54:59 damien Exp $");
+RCSID("$Id: ssh.c,v 1.13 1999/12/06 00:47:29 damien Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -162,8 +162,8 @@
int
main(int ac, char **av)
{
- int i, opt, optind, type, exit_status, ok, fwd_port, fwd_host_port,
- authfd;
+ int i, opt, optind, type, exit_status, ok, authfd;
+ u_short fwd_port, fwd_host_port;
char *optarg, *cp, buf[256];
Buffer command;
struct winsize ws;
@@ -340,10 +340,6 @@
case 'p':
options.port = atoi(optarg);
- if (options.port < 1 || options.port > 65535) {
- fprintf(stderr, "Bad port %s.\n", optarg);
- exit(1);
- }
break;
case 'l':
@@ -351,7 +347,7 @@
break;
case 'R':
- if (sscanf(optarg, "%d:%255[^:]:%d", &fwd_port, buf,
+ if (sscanf(optarg, "%hu:%255[^:]:%hu", &fwd_port, buf,
&fwd_host_port) != 3) {
fprintf(stderr, "Bad forwarding specification '%s'.\n", optarg);
usage();
@@ -361,7 +357,7 @@
break;
case 'L':
- if (sscanf(optarg, "%d:%255[^:]:%d", &fwd_port, buf,
+ if (sscanf(optarg, "%hu:%255[^:]:%hu", &fwd_port, buf,
&fwd_host_port) != 3) {
fprintf(stderr, "Bad forwarding specification '%s'.\n", optarg);
usage();
@@ -561,7 +557,7 @@
/* Check if the connection failed, and try "rsh" if appropriate. */
if (!ok) {
if (options.port != 0)
- log("Secure connection to %.100s on port %d refused%.100s.",
+ log("Secure connection to %.100s on port %hu refused%.100s.",
host, options.port,
options.fallback_to_rsh ? "; reverting to insecure method" : "");
else