[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.95.2.2 and 1.96

version 1.95.2.2, 2003/04/03 22:35:17 version 1.96, 2002/06/08 05:17:01
Line 92 
Line 92 
 typedef enum {  typedef enum {
         oBadOption,          oBadOption,
         oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication,          oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication,
         oPasswordAuthentication, oRSAAuthentication,          oPasswordAuthentication, oRSAAuthentication,
         oChallengeResponseAuthentication, oXAuthLocation,          oChallengeResponseAuthentication, oXAuthLocation,
 #if defined(KRB4) || defined(KRB5)  #if defined(KRB4) || defined(KRB5)
         oKerberosAuthentication,          oKerberosAuthentication,
Line 114 
Line 114 
         oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,          oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
         oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,          oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
         oClearAllForwardings, oNoHostAuthenticationForLocalhost,          oClearAllForwardings, oNoHostAuthenticationForLocalhost,
         oEnableSSHKeysign,  
         oDeprecated          oDeprecated
 } OpCodes;  } OpCodes;
   
Line 186 
Line 185 
         { "bindaddress", oBindAddress },          { "bindaddress", oBindAddress },
         { "smartcarddevice", oSmartcardDevice },          { "smartcarddevice", oSmartcardDevice },
         { "clearallforwardings", oClearAllForwardings },          { "clearallforwardings", oClearAllForwardings },
         { "enablesshkeysign", oEnableSSHKeysign },  
         { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },          { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
         { NULL, oBadOption }          { NULL, oBadOption }
 };  };
Line 266 
Line 264 
  * Processes a single option line as used in the configuration files. This   * Processes a single option line as used in the configuration files. This
  * only sets those values that have not already been set.   * only sets those values that have not already been set.
  */   */
 #define WHITESPACE " \t\r\n"  
   
 int  int
 process_config_line(Options *options, const char *host,  process_config_line(Options *options, const char *host,
                     char *line, const char *filename, int linenum,                      char *line, const char *filename, int linenum,
                     int *activep)                      int *activep)
 {  {
         char buf[256], *s, **charptr, *endofnumber, *keyword, *arg;          char buf[256], *s, *string, **charptr, *endofnumber, *keyword, *arg;
         int opcode, *intptr, value;          int opcode, *intptr, value;
         size_t len;  
         u_short fwd_port, fwd_host_port;          u_short fwd_port, fwd_host_port;
         char sfwd_host_port[6];          char sfwd_host_port[6];
   
Line 488 
Line 484 
   
         case oProxyCommand:          case oProxyCommand:
                 charptr = &options->proxy_command;                  charptr = &options->proxy_command;
                 len = strspn(s, WHITESPACE "=");                  string = xstrdup("");
                   while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
                           string = xrealloc(string, strlen(string) + strlen(arg) + 2);
                           strcat(string, " ");
                           strcat(string, arg);
                   }
                 if (*activep && *charptr == NULL)                  if (*activep && *charptr == NULL)
                         *charptr = xstrdup(s + len);                          *charptr = string;
                   else
                           xfree(string);
                 return 0;                  return 0;
   
         case oPort:          case oPort:
Line 664 
Line 667 
                         *intptr = value;                          *intptr = value;
                 break;                  break;
   
         case oEnableSSHKeysign:  
                 intptr = &options->enable_ssh_keysign;  
                 goto parse_flag;  
   
         case oDeprecated:          case oDeprecated:
                 debug("%s line %d: Deprecated option \"%s\"",                  fatal("%s line %d: Deprecated option \"%s\"",
                     filename, linenum, keyword);                      filename, linenum, keyword);
                 return 0;                  break;
   
         default:          default:
                 fatal("process_config_line: Unimplemented opcode %d", opcode);                  fatal("process_config_line: Unimplemented opcode %d", opcode);
Line 791 
Line 790 
         options->preferred_authentications = NULL;          options->preferred_authentications = NULL;
         options->bind_address = NULL;          options->bind_address = NULL;
         options->smartcard_device = NULL;          options->smartcard_device = NULL;
         options->enable_ssh_keysign = - 1;  
         options->no_host_authentication_for_localhost = - 1;          options->no_host_authentication_for_localhost = - 1;
 }  }
   
Line 816 
Line 814 
         if (options->use_privileged_port == -1)          if (options->use_privileged_port == -1)
                 options->use_privileged_port = 0;                  options->use_privileged_port = 0;
         if (options->rhosts_authentication == -1)          if (options->rhosts_authentication == -1)
                 options->rhosts_authentication = 0;                  options->rhosts_authentication = 1;
         if (options->rsa_authentication == -1)          if (options->rsa_authentication == -1)
                 options->rsa_authentication = 1;                  options->rsa_authentication = 1;
         if (options->pubkey_authentication == -1)          if (options->pubkey_authentication == -1)
Line 840 
Line 838 
         if (options->kbd_interactive_authentication == -1)          if (options->kbd_interactive_authentication == -1)
                 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 = 0;                  options->rhosts_rsa_authentication = 1;
         if (options->hostbased_authentication == -1)          if (options->hostbased_authentication == -1)
                 options->hostbased_authentication = 0;                  options->hostbased_authentication = 0;
         if (options->batch_mode == -1)          if (options->batch_mode == -1)
Line 907 
Line 905 
                 clear_forwardings(options);                  clear_forwardings(options);
         if (options->no_host_authentication_for_localhost == - 1)          if (options->no_host_authentication_for_localhost == - 1)
                 options->no_host_authentication_for_localhost = 0;                  options->no_host_authentication_for_localhost = 0;
         if (options->enable_ssh_keysign == -1)  
                 options->enable_ssh_keysign = 0;  
         /* options->proxy_command should not be set by default */          /* options->proxy_command should not be set by default */
         /* options->user will be set in the main program if appropriate */          /* options->user will be set in the main program if appropriate */
         /* options->hostname will be set in the main program if appropriate */          /* options->hostname will be set in the main program if appropriate */

Legend:
Removed from v.1.95.2.2  
changed lines
  Added in v.1.96