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

Diff for /src/usr.bin/ssh/servconf.c between version 1.268 and 1.269

version 1.268, 2015/05/01 07:08:08 version 1.269, 2015/05/04 06:10:48
Line 713 
Line 713 
 {  {
         int result = 1, attributes = 0, port;          int result = 1, attributes = 0, port;
         char *arg, *attrib, *cp = *condition;          char *arg, *attrib, *cp = *condition;
         size_t len;  
   
         if (ci == NULL)          if (ci == NULL)
                 debug3("checking syntax for 'Match %s'", cp);                  debug3("checking syntax for 'Match %s'", cp);
Line 740 
Line 739 
                         error("Missing Match criteria for %s", attrib);                          error("Missing Match criteria for %s", attrib);
                         return -1;                          return -1;
                 }                  }
                 len = strlen(arg);  
                 if (strcasecmp(attrib, "user") == 0) {                  if (strcasecmp(attrib, "user") == 0) {
                         if (ci == NULL || ci->user == NULL) {                          if (ci == NULL || ci->user == NULL) {
                                 result = 0;                                  result = 0;
                                 continue;                                  continue;
                         }                          }
                         if (match_pattern_list(ci->user, arg, len, 0) != 1)                          if (match_pattern_list(ci->user, arg, 0) != 1)
                                 result = 0;                                  result = 0;
                         else                          else
                                 debug("user %.100s matched 'User %.100s' at "                                  debug("user %.100s matched 'User %.100s' at "
Line 767 
Line 765 
                                 result = 0;                                  result = 0;
                                 continue;                                  continue;
                         }                          }
                         if (match_hostname(ci->host, arg, len) != 1)                          if (match_hostname(ci->host, arg) != 1)
                                 result = 0;                                  result = 0;
                         else                          else
                                 debug("connection from %.100s matched 'Host "                                  debug("connection from %.100s matched 'Host "

Legend:
Removed from v.1.268  
changed lines
  Added in v.1.269