[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.49.2.3 and 1.49.2.4

version 1.49.2.3, 2001/03/21 19:46:27 version 1.49.2.4, 2001/05/07 21:09:32
Line 110 
Line 110 
         oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,          oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
         oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,          oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,
         oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,          oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
         oPreferredAuthentications          oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
           oHostKeyAlgorithms
 } OpCodes;  } OpCodes;
   
 /* Textual representations of the tokens. */  /* Textual representations of the tokens. */
Line 131 
Line 132 
         { "rsaauthentication", oRSAAuthentication },          { "rsaauthentication", oRSAAuthentication },
         { "pubkeyauthentication", oPubkeyAuthentication },          { "pubkeyauthentication", oPubkeyAuthentication },
         { "dsaauthentication", oPubkeyAuthentication },             /* alias */          { "dsaauthentication", oPubkeyAuthentication },             /* alias */
           { "rhostsrsaauthentication", oRhostsRSAAuthentication },
           { "hostbasedauthentication", oHostbasedAuthentication },
         { "challengeresponseauthentication", oChallengeResponseAuthentication },          { "challengeresponseauthentication", oChallengeResponseAuthentication },
         { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */          { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */
         { "tisauthentication", oChallengeResponseAuthentication },  /* alias */          { "tisauthentication", oChallengeResponseAuthentication },  /* alias */
Line 158 
Line 161 
         { "user", oUser },          { "user", oUser },
         { "host", oHost },          { "host", oHost },
         { "escapechar", oEscapeChar },          { "escapechar", oEscapeChar },
         { "rhostsrsaauthentication", oRhostsRSAAuthentication },  
         { "globalknownhostsfile", oGlobalKnownHostsFile },          { "globalknownhostsfile", oGlobalKnownHostsFile },
         { "userknownhostsfile", oUserKnownHostsFile },          { "userknownhostsfile", oUserKnownHostsFile },
         { "globalknownhostsfile2", oGlobalKnownHostsFile2 },          { "globalknownhostsfile2", oGlobalKnownHostsFile2 },
Line 172 
Line 174 
         { "keepalive", oKeepAlives },          { "keepalive", oKeepAlives },
         { "numberofpasswordprompts", oNumberOfPasswordPrompts },          { "numberofpasswordprompts", oNumberOfPasswordPrompts },
         { "loglevel", oLogLevel },          { "loglevel", oLogLevel },
           { "dynamicforward", oDynamicForward },
         { "preferredauthentications", oPreferredAuthentications },          { "preferredauthentications", oPreferredAuthentications },
           { "hostkeyalgorithms", oHostKeyAlgorithms },
         { NULL, 0 }          { NULL, 0 }
 };  };
   
Line 217 
Line 221 
 }  }
   
 /*  /*
  * Returns the number of the token pointed to by cp of length len. Never   * Returns the number of the token pointed to by cp or oBadOption.
  * returns if the token is not known.  
  */   */
   
 static OpCodes  static OpCodes
Line 230 
Line 233 
                 if (strcasecmp(cp, keywords[i].name) == 0)                  if (strcasecmp(cp, keywords[i].name) == 0)
                         return keywords[i].opcode;                          return keywords[i].opcode;
   
         fprintf(stderr, "%s: line %d: Bad configuration option: %s\n",          error("%s: line %d: Bad configuration option: %s",
                 filename, linenum, cp);              filename, linenum, cp);
         return oBadOption;          return oBadOption;
 }  }
   
Line 322 
Line 325 
                 intptr = &options->rhosts_rsa_authentication;                  intptr = &options->rhosts_rsa_authentication;
                 goto parse_flag;                  goto parse_flag;
   
           case oHostbasedAuthentication:
                   intptr = &options->hostbased_authentication;
                   goto parse_flag;
   
         case oChallengeResponseAuthentication:          case oChallengeResponseAuthentication:
                 intptr = &options->challenge_reponse_authentication;                  intptr = &options->challenge_reponse_authentication;
                 goto parse_flag;                  goto parse_flag;
Line 520 
Line 527 
                         options->macs = xstrdup(arg);                          options->macs = xstrdup(arg);
                 break;                  break;
   
           case oHostKeyAlgorithms:
                   arg = strdelim(&s);
                   if (!arg || *arg == '\0')
                           fatal("%.200s line %d: Missing argument.", filename, linenum);
                   if (!key_names_valid2(arg))
                           fatal("%.200s line %d: Bad protocol 2 host key algorithms '%s'.",
                                 filename, linenum, arg ? arg : "<NONE>");
                   if (*activep && options->hostkeyalgorithms == NULL)
                           options->hostkeyalgorithms = xstrdup(arg);
                   break;
   
         case oProtocol:          case oProtocol:
                 intptr = &options->protocol;                  intptr = &options->protocol;
                 arg = strdelim(&s);                  arg = strdelim(&s);
Line 548 
Line 566 
                 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 argument.", filename, linenum);
                 if (arg[0] < '0' || arg[0] > '9')                  fwd_port = a2port(arg);
                   if (fwd_port == 0)
                         fatal("%.200s line %d: Badly formatted port number.",                          fatal("%.200s line %d: Badly formatted port number.",
                               filename, linenum);                                filename, linenum);
                 fwd_port = atoi(arg);  
                 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.",
Line 567 
Line 585 
                 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 argument.", filename, linenum);
                 if (arg[0] < '0' || arg[0] > '9')                  fwd_port = a2port(arg);
                   if (fwd_port == 0)
                         fatal("%.200s line %d: Badly formatted port number.",                          fatal("%.200s line %d: Badly formatted port number.",
                               filename, linenum);                                filename, linenum);
                 fwd_port = atoi(arg);  
                 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.",
Line 582 
Line 600 
                         add_local_forward(options, fwd_port, buf, fwd_host_port);                          add_local_forward(options, fwd_port, buf, fwd_host_port);
                 break;                  break;
   
           case oDynamicForward:
                   arg = strdelim(&s);
                   if (!arg || *arg == '\0')
                           fatal("%.200s line %d: Missing port argument.",
                               filename, linenum);
                   fwd_port = a2port(arg);
                   if (fwd_port == 0)
                           fatal("%.200s line %d: Badly formatted port number.",
                               filename, linenum);
                   add_local_forward(options, fwd_port, "socks4", 0);
                   break;
   
         case oHost:          case oHost:
                 *activep = 0;                  *activep = 0;
                 while ((arg = strdelim(&s)) != NULL && *arg != '\0')                  while ((arg = strdelim(&s)) != NULL && *arg != '\0')
Line 698 
Line 728 
         options->kbd_interactive_authentication = -1;          options->kbd_interactive_authentication = -1;
         options->kbd_interactive_devices = NULL;          options->kbd_interactive_devices = NULL;
         options->rhosts_rsa_authentication = -1;          options->rhosts_rsa_authentication = -1;
           options->hostbased_authentication = -1;
         options->fallback_to_rsh = -1;          options->fallback_to_rsh = -1;
         options->use_rsh = -1;          options->use_rsh = -1;
         options->batch_mode = -1;          options->batch_mode = -1;
Line 712 
Line 743 
         options->cipher = -1;          options->cipher = -1;
         options->ciphers = NULL;          options->ciphers = NULL;
         options->macs = NULL;          options->macs = NULL;
           options->hostkeyalgorithms = NULL;
         options->protocol = SSH_PROTO_UNKNOWN;          options->protocol = SSH_PROTO_UNKNOWN;
         options->num_identity_files = 0;          options->num_identity_files = 0;
         options->hostname = NULL;          options->hostname = NULL;
Line 775 
Line 807 
                 options->kbd_interactive_authentication = 1;                  options->kbd_interactive_authentication = 1;
         if (options->rhosts_rsa_authentication == -1)          if (options->rhosts_rsa_authentication == -1)
                 options->rhosts_rsa_authentication = 1;                  options->rhosts_rsa_authentication = 1;
           if (options->hostbased_authentication == -1)
                   options->hostbased_authentication = 0;
         if (options->fallback_to_rsh == -1)          if (options->fallback_to_rsh == -1)
                 options->fallback_to_rsh = 0;                  options->fallback_to_rsh = 0;
         if (options->use_rsh == -1)          if (options->use_rsh == -1)
Line 802 
Line 836 
                 options->cipher = SSH_CIPHER_NOT_SET;                  options->cipher = SSH_CIPHER_NOT_SET;
         /* options->ciphers, default set in myproposals.h */          /* options->ciphers, default set in myproposals.h */
         /* options->macs, default set in myproposals.h */          /* options->macs, default set in myproposals.h */
           /* options->hostkeyalgorithms, default set in myproposals.h */
         if (options->protocol == SSH_PROTO_UNKNOWN)          if (options->protocol == SSH_PROTO_UNKNOWN)
                 options->protocol = SSH_PROTO_1|SSH_PROTO_2|SSH_PROTO_1_PREFERRED;                  options->protocol = SSH_PROTO_1|SSH_PROTO_2;
         if (options->num_identity_files == 0) {          if (options->num_identity_files == 0) {
                 if (options->protocol & SSH_PROTO_1) {                  if (options->protocol & SSH_PROTO_1) {
                         len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1;                          len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1;

Legend:
Removed from v.1.49.2.3  
changed lines
  Added in v.1.49.2.4