[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.242 and 1.243

version 1.242, 2013/10/23 05:40:58 version 1.243, 2013/10/24 00:51:48
Line 606 
Line 606 
 static int  static int
 match_cfg_line(char **condition, int line, struct connection_info *ci)  match_cfg_line(char **condition, int line, struct connection_info *ci)
 {  {
         int result = 1, port;          int result = 1, attributes = 0, port;
         char *arg, *attrib, *cp = *condition;          char *arg, *attrib, *cp = *condition;
         size_t len;          size_t len;
   
Line 620 
Line 620 
                     ci->laddress ? ci->laddress : "(null)", ci->lport);                      ci->laddress ? ci->laddress : "(null)", ci->lport);
   
         while ((attrib = strdelim(&cp)) && *attrib != '\0') {          while ((attrib = strdelim(&cp)) && *attrib != '\0') {
                   attributes++;
                   if (strcasecmp(attrib, "all") == 0) {
                           if (attributes != 1 ||
                               ((arg = strdelim(&cp)) != NULL && *arg != '\0')) {
                                   error("'all' cannot be combined with other "
                                       "Match attributes");
                                   return -1;
                           }
                           *condition = cp;
                           return 1;
                   }
                 if ((arg = strdelim(&cp)) == NULL || *arg == '\0') {                  if ((arg = strdelim(&cp)) == NULL || *arg == '\0') {
                         error("Missing Match criteria for %s", attrib);                          error("Missing Match criteria for %s", attrib);
                         return -1;                          return -1;
Line 712 
Line 723 
                         error("Unsupported Match attribute %s", attrib);                          error("Unsupported Match attribute %s", attrib);
                         return -1;                          return -1;
                 }                  }
           }
           if (attributes == 0) {
                   error("One or more attributes required for Match");
                   return -1;
         }          }
         if (ci != NULL)          if (ci != NULL)
                 debug3("match %sfound", result ? "" : "not ");                  debug3("match %sfound", result ? "" : "not ");

Legend:
Removed from v.1.242  
changed lines
  Added in v.1.243