=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/servconf.c,v retrieving revision 1.140.2.2 retrieving revision 1.141 diff -u -r1.140.2.2 -r1.141 --- src/usr.bin/ssh/servconf.c 2006/02/03 02:53:44 1.140.2.2 +++ src/usr.bin/ssh/servconf.c 2005/05/16 15:30:51 1.141 @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.140.2.2 2006/02/03 02:53:44 brad Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.141 2005/05/16 15:30:51 markus Exp $"); #include "ssh.h" #include "log.h" @@ -96,7 +96,6 @@ options->authorized_keys_file = NULL; options->authorized_keys_file2 = NULL; options->num_accept_env = 0; - options->permit_tun = -1; /* Needs to be accessable in many places */ use_privsep = -1; @@ -192,7 +191,7 @@ if (options->use_login == -1) options->use_login = 0; if (options->compression == -1) - options->compression = COMP_DELAYED; + options->compression = 1; if (options->allow_tcp_forwarding == -1) options->allow_tcp_forwarding = 1; if (options->gateway_ports == -1) @@ -220,8 +219,6 @@ } if (options->authorized_keys_file == NULL) 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 */ if (use_privsep == -1) @@ -250,7 +247,7 @@ sBanner, sUseDNS, sHostbasedAuthentication, sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, - sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, + sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sUsePrivilegeSeparation, sDeprecated, sUnsupported } ServerOpCodes; @@ -341,7 +338,6 @@ { "authorizedkeysfile2", sAuthorizedKeysFile2 }, { "useprivilegeseparation", sUsePrivilegeSeparation}, { "acceptenv", sAcceptEnv }, - { "permittunnel", sPermitTunnel }, { NULL, sBadOption } }; @@ -367,7 +363,7 @@ static void add_listen_addr(ServerOptions *options, char *addr, u_short port) { - u_int i; + int i; if (options->num_ports == 0) options->ports[options->num_ports++] = SSH_DEFAULT_PORT; @@ -407,10 +403,9 @@ const char *filename, int linenum) { char *cp, **charptr, *arg, *p; - int *intptr, value, n; + int *intptr, value, i, n; ServerOpCodes opcode; u_short port; - u_int i; cp = line; arg = strdelim(&cp); @@ -480,12 +475,6 @@ if (arg == NULL || *arg == '\0') fatal("%s line %d: missing address", 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); if (p == NULL) fatal("%s line %d: bad address:port usage", @@ -694,23 +683,7 @@ case sCompression: intptr = &options->compression; - arg = strdelim(&cp); - 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; + goto parse_flag; case sGatewayPorts: intptr = &options->gateway_ports; @@ -923,28 +896,6 @@ options->accept_env[options->num_accept_env++] = 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; case sDeprecated: