[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.12 and 1.13

version 1.12, 1999/10/15 21:39:02 version 1.13, 1999/11/10 23:36:44
Line 101 
Line 101 
   oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,    oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
   oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,    oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
   oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, oTISAuthentication,    oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, oTISAuthentication,
   oUsePrivilegedPort    oUsePrivilegedPort, oLogLevel
 } OpCodes;  } OpCodes;
   
 /* Textual representations of the tokens. */  /* Textual representations of the tokens. */
Line 150 
Line 150 
   { "keepalive", oKeepAlives },    { "keepalive", oKeepAlives },
   { "numberofpasswordprompts", oNumberOfPasswordPrompts },    { "numberofpasswordprompts", oNumberOfPasswordPrompts },
   { "tisauthentication", oTISAuthentication },    { "tisauthentication", oTISAuthentication },
     { "loglevel", oLogLevel },
   { NULL, 0 }    { NULL, 0 }
 };  };
   
   /* textual representation of log-levels */
   
   static struct
   {
     const char *name;
     LogLevel level;
   } log_levels[] =
   {
     { "QUIET", SYSLOG_LEVEL_QUIET },
     { "FATAL", SYSLOG_LEVEL_FATAL },
     { "ERROR", SYSLOG_LEVEL_ERROR },
     { "INFO",  SYSLOG_LEVEL_INFO },
     { "CHAT",  SYSLOG_LEVEL_CHAT },
     { "DEBUG", SYSLOG_LEVEL_DEBUG },
     { NULL, 0 }
   };
   
 /* Characters considered whitespace in strtok calls. */  /* Characters considered whitespace in strtok calls. */
 #define WHITESPACE " \t\r\n"  #define WHITESPACE " \t\r\n"
   
Line 218 
Line 236 
                          int *activep)                           int *activep)
 {  {
   char buf[256], *cp, *string, **charptr;    char buf[256], *cp, *string, **charptr;
   int opcode, *intptr, value, fwd_port, fwd_host_port;    int opcode, *intptr, value, fwd_port, fwd_host_port, i;
   
   /* Skip leading whitespace. */    /* Skip leading whitespace. */
   cp = line + strspn(line, WHITESPACE);    cp = line + strspn(line, WHITESPACE);
Line 445 
Line 463 
       if (*activep && *intptr == -1)        if (*activep && *intptr == -1)
         *intptr = value;          *intptr = value;
       break;        break;
   
       case oLogLevel:
         cp = strtok(NULL, WHITESPACE);
         if (!cp)
           {
             fprintf(stderr, "%s line %d: missing level name.\n",
                     filename, linenum);
             exit(1);
           }
         for (i = 0; log_levels[i].name; i++)
           if (strcasecmp(log_levels[i].name, cp) == 0)
             break;
         if (!log_levels[i].name)
           {
             fprintf(stderr, "%s line %d: unsupported log level %s\n",
                     filename, linenum, cp);
             exit(1);
           }
         if (options->log_level == (LogLevel)(-1))
           options->log_level = log_levels[i].level;
         break;
   
     case oRemoteForward:      case oRemoteForward:
       cp = strtok(NULL, WHITESPACE);        cp = strtok(NULL, WHITESPACE);
Line 607 
Line 646 
   options->user_hostfile = NULL;    options->user_hostfile = 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;
 }  }
   
 /* Called after processing other sources of option data, this fills those  /* Called after processing other sources of option data, this fills those
Line 677 
Line 717 
     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->log_level == (LogLevel)-1)
       options->log_level = SYSLOG_LEVEL_INFO;
   /* 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.12  
changed lines
  Added in v.1.13