[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.26 and 1.27

version 1.26, 2000/04/14 10:30:32 version 1.27, 2000/04/26 20:56:29
Line 104 
Line 104 
         oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,          oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
         oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,          oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
         oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, oTISAuthentication,          oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, oTISAuthentication,
         oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol          oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oIdentityFile2,
           oGlobalKnownHostsFile2, oUserKnownHostsFile2
 } OpCodes;  } OpCodes;
   
 /* Textual representations of the tokens. */  /* Textual representations of the tokens. */
Line 131 
Line 132 
         { "fallbacktorsh", oFallBackToRsh },          { "fallbacktorsh", oFallBackToRsh },
         { "usersh", oUseRsh },          { "usersh", oUseRsh },
         { "identityfile", oIdentityFile },          { "identityfile", oIdentityFile },
           { "identityfile2", oIdentityFile2 },
         { "hostname", oHostName },          { "hostname", oHostName },
         { "proxycommand", oProxyCommand },          { "proxycommand", oProxyCommand },
         { "port", oPort },          { "port", oPort },
Line 145 
Line 147 
         { "rhostsrsaauthentication", oRhostsRSAAuthentication },          { "rhostsrsaauthentication", oRhostsRSAAuthentication },
         { "globalknownhostsfile", oGlobalKnownHostsFile },          { "globalknownhostsfile", oGlobalKnownHostsFile },
         { "userknownhostsfile", oUserKnownHostsFile },          { "userknownhostsfile", oUserKnownHostsFile },
           { "globalknownhostsfile2", oGlobalKnownHostsFile2 },
           { "userknownhostsfile2", oUserKnownHostsFile2 },
         { "connectionattempts", oConnectionAttempts },          { "connectionattempts", oConnectionAttempts },
         { "batchmode", oBatchMode },          { "batchmode", oBatchMode },
         { "checkhostip", oCheckHostIP },          { "checkhostip", oCheckHostIP },
Line 368 
Line 372 
                 goto parse_int;                  goto parse_int;
   
         case oIdentityFile:          case oIdentityFile:
           case oIdentityFile2:
                 cp = strtok(NULL, WHITESPACE);                  cp = strtok(NULL, WHITESPACE);
                 if (!cp)                  if (!cp)
                         fatal("%.200s line %d: Missing argument.", filename, linenum);                          fatal("%.200s line %d: Missing argument.", filename, linenum);
                 if (*activep) {                  if (*activep) {
                         if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)                          intptr = (opcode == oIdentityFile) ?
                               &options->num_identity_files :
                               &options->num_identity_files2;
                           if (*intptr >= SSH_MAX_IDENTITY_FILES)
                                 fatal("%.200s line %d: Too many identity files specified (max %d).",                                  fatal("%.200s line %d: Too many identity files specified (max %d).",
                                       filename, linenum, SSH_MAX_IDENTITY_FILES);                                        filename, linenum, SSH_MAX_IDENTITY_FILES);
                         options->identity_files[options->num_identity_files++] = xstrdup(cp);                          charptr = (opcode == oIdentityFile) ?
                               &options->identity_files[*intptr] :
                               &options->identity_files2[*intptr];
                           *charptr = xstrdup(cp);
                           *intptr = *intptr + 1;
                 }                  }
                 break;                  break;
   
Line 397 
Line 409 
                 charptr = &options->user_hostfile;                  charptr = &options->user_hostfile;
                 goto parse_string;                  goto parse_string;
   
           case oGlobalKnownHostsFile2:
                   charptr = &options->system_hostfile2;
                   goto parse_string;
   
           case oUserKnownHostsFile2:
                   charptr = &options->user_hostfile2;
                   goto parse_string;
   
         case oHostName:          case oHostName:
                 charptr = &options->hostname;                  charptr = &options->hostname;
                 goto parse_string;                  goto parse_string;
Line 642 
Line 662 
         options->ciphers = NULL;          options->ciphers = NULL;
         options->protocol = SSH_PROTO_UNKNOWN;          options->protocol = SSH_PROTO_UNKNOWN;
         options->num_identity_files = 0;          options->num_identity_files = 0;
           options->num_identity_files2 = 0;
         options->hostname = NULL;          options->hostname = NULL;
         options->proxy_command = NULL;          options->proxy_command = NULL;
         options->user = NULL;          options->user = NULL;
         options->escape_char = -1;          options->escape_char = -1;
         options->system_hostfile = NULL;          options->system_hostfile = NULL;
         options->user_hostfile = NULL;          options->user_hostfile = NULL;
           options->system_hostfile2 = NULL;
           options->user_hostfile2 = NULL;
         options->num_local_forwards = 0;          options->num_local_forwards = 0;
         options->num_remote_forwards = 0;          options->num_remote_forwards = 0;
         options->log_level = (LogLevel) - 1;          options->log_level = (LogLevel) - 1;
Line 722 
Line 745 
                 sprintf(options->identity_files[0], "~/%.100s", SSH_CLIENT_IDENTITY);                  sprintf(options->identity_files[0], "~/%.100s", SSH_CLIENT_IDENTITY);
                 options->num_identity_files = 1;                  options->num_identity_files = 1;
         }          }
   #if 0
           if (options->num_identity_files2 == 0) {
                   options->identity_files2[0] =
                           xmalloc(2 + strlen(SSH2_CLIENT_IDENTITY) + 1);
                   sprintf(options->identity_files2[0], "~/%.100s", SSH2_CLIENT_IDENTITY);
                   options->num_identity_files2 = 1;
           }
   #endif
         if (options->escape_char == -1)          if (options->escape_char == -1)
                 options->escape_char = '~';                  options->escape_char = '~';
         if (options->system_hostfile == NULL)          if (options->system_hostfile == NULL)
                 options->system_hostfile = SSH_SYSTEM_HOSTFILE;                  options->system_hostfile = SSH_SYSTEM_HOSTFILE;
         if (options->user_hostfile == NULL)          if (options->user_hostfile == NULL)
                 options->user_hostfile = SSH_USER_HOSTFILE;                  options->user_hostfile = SSH_USER_HOSTFILE;
           if (options->system_hostfile2 == NULL)
                   options->system_hostfile2 = SSH_SYSTEM_HOSTFILE2;
           if (options->user_hostfile2 == NULL)
                   options->user_hostfile2 = SSH_USER_HOSTFILE2;
         if (options->log_level == (LogLevel) - 1)          if (options->log_level == (LogLevel) - 1)
                 options->log_level = SYSLOG_LEVEL_INFO;                  options->log_level = SYSLOG_LEVEL_INFO;
         /* options->proxy_command should not be set by default */          /* options->proxy_command should not be set by default */

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27