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

Diff for /src/usr.bin/ssh/readconf.c between version 1.87 and 1.88

version 1.87, 2001/08/28 09:51:26 version 1.88, 2001/08/30 16:04:35
Line 258 
Line 258 
         char buf[256], *s, *string, **charptr, *endofnumber, *keyword, *arg;          char buf[256], *s, *string, **charptr, *endofnumber, *keyword, *arg;
         int opcode, *intptr, value;          int opcode, *intptr, value;
         u_short fwd_port, fwd_host_port;          u_short fwd_port, fwd_host_port;
           char sfwd_host_port[6];
   
         s = line;          s = line;
         /* Get the keyword. (Each line is supposed to begin with a keyword). */          /* Get the keyword. (Each line is supposed to begin with a keyword). */
Line 575 
Line 576 
                         *intptr = (LogLevel) value;                          *intptr = (LogLevel) value;
                 break;                  break;
   
           case oLocalForward:
         case oRemoteForward:          case oRemoteForward:
                 arg = strdelim(&s);                  arg = strdelim(&s);
                 if (!arg || *arg == '\0')                  if (!arg || *arg == '\0')
                         fatal("%.200s line %d: Missing argument.", filename, linenum);                          fatal("%.200s line %d: Missing port argument.",
                 fwd_port = a2port(arg);                              filename, linenum);
                 if (fwd_port == 0)                  if ((fwd_port = a2port(arg)) == 0)
                         fatal("%.200s line %d: Badly formatted port number.",                          fatal("%.200s line %d: Bad listen port.",
                               filename, linenum);                              filename, linenum);
                 arg = strdelim(&s);                  arg = strdelim(&s);
                 if (!arg || *arg == '\0')                  if (!arg || *arg == '\0')
                         fatal("%.200s line %d: Missing second argument.",                          fatal("%.200s line %d: Missing second argument.",
                               filename, linenum);                              filename, linenum);
                 if (sscanf(arg, "%255[^:]:%hu", buf, &fwd_host_port) != 2)                  if (sscanf(arg, "%255[^:]:%5[0-9]", buf, sfwd_host_port) != 2 &&
                         fatal("%.200s line %d: Badly formatted host:port.",                      sscanf(arg, "%255[^/]/%5[0-9]", buf, sfwd_host_port) != 2)
                               filename, linenum);                          fatal("%.200s line %d: Bad forwarding specification.",
                 if (*activep)                              filename, linenum);
                         add_remote_forward(options, fwd_port, buf, fwd_host_port);                  if ((fwd_host_port = a2port(sfwd_host_port)) == 0)
                 break;                          fatal("%.200s line %d: Bad forwarding port.",
                               filename, linenum);
         case oLocalForward:                  if (*activep) {
                 arg = strdelim(&s);                          if (opcode == oLocalForward)
                 if (!arg || *arg == '\0')                                  add_local_forward(options, fwd_port, buf,
                         fatal("%.200s line %d: Missing argument.", filename, linenum);                                      fwd_host_port);
                 fwd_port = a2port(arg);                          else if (opcode == oRemoteForward)
                 if (fwd_port == 0)                                  add_remote_forward(options, fwd_port, buf,
                         fatal("%.200s line %d: Badly formatted port number.",                                      fwd_host_port);
                               filename, linenum);                  }
                 arg = strdelim(&s);  
                 if (!arg || *arg == '\0')  
                         fatal("%.200s line %d: Missing second argument.",  
                               filename, linenum);  
                 if (sscanf(arg, "%255[^:]:%hu", buf, &fwd_host_port) != 2)  
                         fatal("%.200s line %d: Badly formatted host:port.",  
                               filename, linenum);  
                 if (*activep)  
                         add_local_forward(options, fwd_port, buf, fwd_host_port);  
                 break;                  break;
   
         case oDynamicForward:          case oDynamicForward:

Legend:
Removed from v.1.87  
changed lines
  Added in v.1.88