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

Diff for /src/usr.bin/ssh/servconf.c between version 1.138 and 1.139

version 1.138, 2004/12/23 23:11:00 version 1.139, 2005/03/01 10:09:52
Line 405 
Line 405 
         char *cp, **charptr, *arg, *p;          char *cp, **charptr, *arg, *p;
         int *intptr, value, i, n;          int *intptr, value, i, n;
         ServerOpCodes opcode;          ServerOpCodes opcode;
           u_short port;
   
         cp = line;          cp = line;
         arg = strdelim(&cp);          arg = strdelim(&cp);
Line 471 
Line 472 
   
         case sListenAddress:          case sListenAddress:
                 arg = strdelim(&cp);                  arg = strdelim(&cp);
                 if (!arg || *arg == '\0' || strncmp(arg, "[]", 2) == 0)                  if (arg == NULL || *arg == '\0')
                         fatal("%s line %d: missing inet addr.",                          fatal("%s line %d: missing address",
                             filename, linenum);                              filename, linenum);
                 if (*arg == '[') {                  p = hpdelim(&arg);
                         if ((p = strchr(arg, ']')) == NULL)                  if (p == NULL)
                                 fatal("%s line %d: bad ipv6 inet addr usage.",                          fatal("%s line %d: bad address:port usage",
                                     filename, linenum);  
                         arg++;  
                         memmove(p, p+1, strlen(p+1)+1);  
                 } else if (((p = strchr(arg, ':')) == NULL) ||  
                             (strchr(p+1, ':') != NULL)) {  
                         add_listen_addr(options, arg, 0);  
                         break;  
                 }  
                 if (*p == ':') {  
                         u_short port;  
   
                         p++;  
                         if (*p == '\0')  
                                 fatal("%s line %d: bad inet addr:port usage.",  
                                     filename, linenum);  
                         else {  
                                 *(p-1) = '\0';  
                                 if ((port = a2port(p)) == 0)  
                                         fatal("%s line %d: bad port number.",  
                                             filename, linenum);  
                                 add_listen_addr(options, arg, port);  
                         }  
                 } else if (*p == '\0')  
                         add_listen_addr(options, arg, 0);  
                 else  
                         fatal("%s line %d: bad inet addr usage.",  
                             filename, linenum);                              filename, linenum);
                   p = cleanhostname(p);
                   if (arg == NULL)
                           port = 0;
                   else if ((port = a2port(arg)) == 0)
                           fatal("%s line %d: bad port number", filename, linenum);
   
                   add_listen_addr(options, p, port);
   
                 break;                  break;
   
         case sAddressFamily:          case sAddressFamily:
Line 701 
Line 684 
   
         case sGatewayPorts:          case sGatewayPorts:
                 intptr = &options->gateway_ports;                  intptr = &options->gateway_ports;
                 goto parse_flag;                  arg = strdelim(&cp);
                   if (!arg || *arg == '\0')
                           fatal("%s line %d: missing yes/no/clientspecified "
                               "argument.", filename, linenum);
                   value = 0;      /* silence compiler */
                   if (strcmp(arg, "clientspecified") == 0)
                           value = 2;
                   else if (strcmp(arg, "yes") == 0)
                           value = 1;
                   else if (strcmp(arg, "no") == 0)
                           value = 0;
                   else
                           fatal("%s line %d: Bad yes/no/clientspecified "
                               "argument: %s", filename, linenum, arg);
                   if (*intptr == -1)
                           *intptr = value;
                   break;
   
         case sUseDNS:          case sUseDNS:
                 intptr = &options->use_dns;                  intptr = &options->use_dns;

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.139