diff options
author | Damien Miller <djm@mindrot.org> | 1999-12-06 11:47:28 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-12-06 11:47:28 +1100 |
commit | aae6c614da614eb10ced16505f35410671c95d9d (patch) | |
tree | 441e578781d38e7de4c5f609a4f86695d937e640 /ssh.c | |
parent | dc33fc3910552c82518503b581efc1a51192fa76 (diff) |
- 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
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -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 @@ rsh_connect(char *host, char *user, Buffer * command) 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 @@ main(int ac, char **av) 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 @@ main(int ac, char **av) 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 @@ main(int ac, char **av) 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 @@ main(int ac, char **av) /* 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 |