[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.36 and 1.37

version 1.36, 2017/03/10 03:52:48 version 1.37, 2017/03/10 04:24:55
Line 40 
Line 40 
 #include <ctype.h>  #include <ctype.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <stdio.h>
   
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "match.h"  #include "match.h"
   #include "misc.h"
   
 /*  /*
  * Returns true if the given string matches the pattern (which may contain ?   * Returns true if the given string matches the pattern (which may contain ?
Line 175 
Line 177 
 int  int
 match_hostname(const char *host, const char *pattern)  match_hostname(const char *host, const char *pattern)
 {  {
         return match_pattern_list(host, pattern, 1);          char *hostcopy = xstrdup(host);
           int r;
   
           lowercase(hostcopy);
           r = match_pattern_list(hostcopy, pattern, 1);
           free(hostcopy);
           return r;
 }  }
   
 /*  /*

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37