[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.140.2.2 and 1.141

version 1.140.2.2, 2006/02/03 02:53:44 version 1.141, 2005/05/16 15:30:51
Line 96 
Line 96 
         options->authorized_keys_file = NULL;          options->authorized_keys_file = NULL;
         options->authorized_keys_file2 = NULL;          options->authorized_keys_file2 = NULL;
         options->num_accept_env = 0;          options->num_accept_env = 0;
         options->permit_tun = -1;  
   
         /* Needs to be accessable in many places */          /* Needs to be accessable in many places */
         use_privsep = -1;          use_privsep = -1;
Line 192 
Line 191 
         if (options->use_login == -1)          if (options->use_login == -1)
                 options->use_login = 0;                  options->use_login = 0;
         if (options->compression == -1)          if (options->compression == -1)
                 options->compression = COMP_DELAYED;                  options->compression = 1;
         if (options->allow_tcp_forwarding == -1)          if (options->allow_tcp_forwarding == -1)
                 options->allow_tcp_forwarding = 1;                  options->allow_tcp_forwarding = 1;
         if (options->gateway_ports == -1)          if (options->gateway_ports == -1)
Line 220 
Line 219 
         }          }
         if (options->authorized_keys_file == NULL)          if (options->authorized_keys_file == NULL)
                 options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS;                  options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS;
         if (options->permit_tun == -1)  
                 options->permit_tun = SSH_TUNMODE_NO;  
   
         /* Turn privilege separation on by default */          /* Turn privilege separation on by default */
         if (use_privsep == -1)          if (use_privsep == -1)
Line 250 
Line 247 
         sBanner, sUseDNS, sHostbasedAuthentication,          sBanner, sUseDNS, sHostbasedAuthentication,
         sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,          sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
         sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,          sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
         sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,          sGssAuthentication, sGssCleanupCreds, sAcceptEnv,
         sUsePrivilegeSeparation,          sUsePrivilegeSeparation,
         sDeprecated, sUnsupported          sDeprecated, sUnsupported
 } ServerOpCodes;  } ServerOpCodes;
Line 341 
Line 338 
         { "authorizedkeysfile2", sAuthorizedKeysFile2 },          { "authorizedkeysfile2", sAuthorizedKeysFile2 },
         { "useprivilegeseparation", sUsePrivilegeSeparation},          { "useprivilegeseparation", sUsePrivilegeSeparation},
         { "acceptenv", sAcceptEnv },          { "acceptenv", sAcceptEnv },
         { "permittunnel", sPermitTunnel },  
         { NULL, sBadOption }          { NULL, sBadOption }
 };  };
   
Line 367 
Line 363 
 static void  static void
 add_listen_addr(ServerOptions *options, char *addr, u_short port)  add_listen_addr(ServerOptions *options, char *addr, u_short port)
 {  {
         u_int i;          int i;
   
         if (options->num_ports == 0)          if (options->num_ports == 0)
                 options->ports[options->num_ports++] = SSH_DEFAULT_PORT;                  options->ports[options->num_ports++] = SSH_DEFAULT_PORT;
Line 407 
Line 403 
     const char *filename, int linenum)      const char *filename, int linenum)
 {  {
         char *cp, **charptr, *arg, *p;          char *cp, **charptr, *arg, *p;
         int *intptr, value, n;          int *intptr, value, i, n;
         ServerOpCodes opcode;          ServerOpCodes opcode;
         u_short port;          u_short port;
         u_int i;  
   
         cp = line;          cp = line;
         arg = strdelim(&cp);          arg = strdelim(&cp);
Line 480 
Line 475 
                 if (arg == NULL || *arg == '\0')                  if (arg == NULL || *arg == '\0')
                         fatal("%s line %d: missing address",                          fatal("%s line %d: missing address",
                             filename, linenum);                              filename, linenum);
                 /* check for bare IPv6 address: no "[]" and 2 or more ":" */  
                 if (strchr(arg, '[') == NULL && (p = strchr(arg, ':')) != NULL  
                     && strchr(p+1, ':') != NULL) {  
                         add_listen_addr(options, arg, 0);  
                         break;  
                 }  
                 p = hpdelim(&arg);                  p = hpdelim(&arg);
                 if (p == NULL)                  if (p == NULL)
                         fatal("%s line %d: bad address:port usage",                          fatal("%s line %d: bad address:port usage",
Line 694 
Line 683 
   
         case sCompression:          case sCompression:
                 intptr = &options->compression;                  intptr = &options->compression;
                 arg = strdelim(&cp);                  goto parse_flag;
                 if (!arg || *arg == '\0')  
                         fatal("%s line %d: missing yes/no/delayed "  
                             "argument.", filename, linenum);  
                 value = 0;      /* silence compiler */  
                 if (strcmp(arg, "delayed") == 0)  
                         value = COMP_DELAYED;  
                 else if (strcmp(arg, "yes") == 0)  
                         value = COMP_ZLIB;  
                 else if (strcmp(arg, "no") == 0)  
                         value = COMP_NONE;  
                 else  
                         fatal("%s line %d: Bad yes/no/delayed "  
                             "argument: %s", filename, linenum, arg);  
                 if (*intptr == -1)  
                         *intptr = value;  
                 break;  
   
         case sGatewayPorts:          case sGatewayPorts:
                 intptr = &options->gateway_ports;                  intptr = &options->gateway_ports;
Line 923 
Line 896 
                         options->accept_env[options->num_accept_env++] =                          options->accept_env[options->num_accept_env++] =
                             xstrdup(arg);                              xstrdup(arg);
                 }                  }
                 break;  
   
         case sPermitTunnel:  
                 intptr = &options->permit_tun;  
                 arg = strdelim(&cp);  
                 if (!arg || *arg == '\0')  
                         fatal("%s line %d: Missing yes/point-to-point/"  
                             "ethernet/no argument.", filename, linenum);  
                 value = 0;      /* silence compiler */  
                 if (strcasecmp(arg, "ethernet") == 0)  
                         value = SSH_TUNMODE_ETHERNET;  
                 else if (strcasecmp(arg, "point-to-point") == 0)  
                         value = SSH_TUNMODE_POINTOPOINT;  
                 else if (strcasecmp(arg, "yes") == 0)  
                         value = SSH_TUNMODE_YES;  
                 else if (strcasecmp(arg, "no") == 0)  
                         value = SSH_TUNMODE_NO;  
                 else  
                         fatal("%s line %d: Bad yes/point-to-point/ethernet/"  
                             "no argument: %s", filename, linenum, arg);  
                 if (*intptr == -1)  
                         *intptr = value;  
                 break;                  break;
   
         case sDeprecated:          case sDeprecated:

Legend:
Removed from v.1.140.2.2  
changed lines
  Added in v.1.141