[BACK]Return to ssh.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh.c between version 1.34 and 1.35

version 1.34, 1999/11/24 20:15:35 version 1.35, 1999/12/01 13:59:15
Line 156 
Line 156 
 int  int
 main(int ac, char **av)  main(int ac, char **av)
 {  {
         int i, opt, optind, type, exit_status, ok, fwd_port, fwd_host_port,          int i, opt, optind, type, exit_status, ok, authfd;
          authfd;          u_short fwd_port, fwd_host_port;
         char *optarg, *cp, buf[256];          char *optarg, *cp, buf[256];
         Buffer command;          Buffer command;
         struct winsize ws;          struct winsize ws;
Line 334 
Line 334 
   
                 case 'p':                  case 'p':
                         options.port = atoi(optarg);                          options.port = atoi(optarg);
                         if (options.port < 1 || options.port > 65535) {  
                                 fprintf(stderr, "Bad port %s.\n", optarg);  
                                 exit(1);  
                         }  
                         break;                          break;
   
                 case 'l':                  case 'l':
Line 345 
Line 341 
                         break;                          break;
   
                 case 'R':                  case 'R':
                         if (sscanf(optarg, "%d:%255[^:]:%d", &fwd_port, buf,                          if (sscanf(optarg, "%hu:%255[^:]:%hu", &fwd_port, buf,
                                    &fwd_host_port) != 3) {                                     &fwd_host_port) != 3) {
                                 fprintf(stderr, "Bad forwarding specification '%s'.\n", optarg);                                  fprintf(stderr, "Bad forwarding specification '%s'.\n", optarg);
                                 usage();                                  usage();
Line 355 
Line 351 
                         break;                          break;
   
                 case 'L':                  case 'L':
                         if (sscanf(optarg, "%d:%255[^:]:%d", &fwd_port, buf,                          if (sscanf(optarg, "%hu:%255[^:]:%hu", &fwd_port, buf,
                                    &fwd_host_port) != 3) {                                     &fwd_host_port) != 3) {
                                 fprintf(stderr, "Bad forwarding specification '%s'.\n", optarg);                                  fprintf(stderr, "Bad forwarding specification '%s'.\n", optarg);
                                 usage();                                  usage();
Line 557 
Line 553 
         /* Check if the connection failed, and try "rsh" if appropriate. */          /* Check if the connection failed, and try "rsh" if appropriate. */
         if (!ok) {          if (!ok) {
                 if (options.port != 0)                  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,                              host, options.port,
                             options.fallback_to_rsh ? "; reverting to insecure method" : "");                              options.fallback_to_rsh ? "; reverting to insecure method" : "");
                 else                  else

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35