[BACK]Return to match.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/match.c between version 1.29 and 1.30

version 1.29, 2013/11/20 20:54:10 version 1.30, 2015/05/04 06:10:48
Line 113 
Line 113 
  * indicate negation).  Returns -1 if negation matches, 1 if there is   * indicate negation).  Returns -1 if negation matches, 1 if there is
  * a positive match, 0 if there is no match at all.   * a positive match, 0 if there is no match at all.
  */   */
   
 int  int
 match_pattern_list(const char *string, const char *pattern, u_int len,  match_pattern_list(const char *string, const char *pattern, int dolower)
     int dolower)  
 {  {
         char sub[1024];          char sub[1024];
         int negated;          int negated;
         int got_positive;          int got_positive;
         u_int i, subi;          u_int i, subi, len = strlen(pattern);
   
         got_positive = 0;          got_positive = 0;
         for (i = 0; i < len;) {          for (i = 0; i < len;) {
Line 175 
Line 173 
  * a positive match, 0 if there is no match at all.   * a positive match, 0 if there is no match at all.
  */   */
 int  int
 match_hostname(const char *host, const char *pattern, u_int len)  match_hostname(const char *host, const char *pattern)
 {  {
         return match_pattern_list(host, pattern, len, 1);          return match_pattern_list(host, pattern, 1);
 }  }
   
 /*  /*
Line 198 
Line 196 
                 return 0;                  return 0;
   
         /* negative hostname match */          /* negative hostname match */
         if ((mhost = match_hostname(host, patterns, strlen(patterns))) == -1)          if ((mhost = match_hostname(host, patterns)) == -1)
                 return 0;                  return 0;
         /* no match at all */          /* no match at all */
         if (mhost == 0 && mip == 0)          if (mhost == 0 && mip == 0)

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30