[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.217 and 1.218

version 1.217, 2014/02/22 01:32:19 version 1.218, 2014/02/23 20:11:36
Line 1458 
Line 1458 
         return 1;          return 1;
 }  }
   
   /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */
   int
   option_clear_or_none(const char *o)
   {
           return o == NULL || strcasecmp(o, "none") == 0;
   }
   
 /*  /*
  * Initializes options to special values that indicate that they have not yet   * Initializes options to special values that indicate that they have not yet
  * been set.  Read_config_file will only set options with this value. Options   * been set.  Read_config_file will only set options with this value. Options
Line 1555 
Line 1562 
 }  }
   
 /*  /*
    * A petite version of fill_default_options() that just fills the options
    * needed for hostname canonicalization to proceed.
    */
   void
   fill_default_options_for_canonicalization(Options *options)
   {
           if (options->canonicalize_max_dots == -1)
                   options->canonicalize_max_dots = 1;
           if (options->canonicalize_fallback_local == -1)
                   options->canonicalize_fallback_local = 1;
           if (options->canonicalize_hostname == -1)
                   options->canonicalize_hostname = SSH_CANONICALISE_NO;
   }
   
   /*
  * Called after processing other sources of option data, this fills those   * Called after processing other sources of option data, this fills those
  * options for which no value has been specified with their default values.   * options for which no value has been specified with their default values.
  */   */
   
 void  void
 fill_default_options(Options * options)  fill_default_options(Options * options)
 {  {
Line 1711 
Line 1732 
                 options->canonicalize_hostname = SSH_CANONICALISE_NO;                  options->canonicalize_hostname = SSH_CANONICALISE_NO;
 #define CLEAR_ON_NONE(v) \  #define CLEAR_ON_NONE(v) \
         do { \          do { \
                 if (v != NULL && strcasecmp(v, "none") == 0) { \                  if (option_clear_or_none(v)) { \
                         free(v); \                          free(v); \
                         v = NULL; \                          v = NULL; \
                 } \                  } \

Legend:
Removed from v.1.217  
changed lines
  Added in v.1.218