[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.382 and 1.383

version 1.382, 2021/09/06 00:36:01 version 1.383, 2022/02/08 08:59:12
Line 844 
Line 844 
 {  {
         u_int i;          u_int i;
         int port;          int port;
         char *host, *arg, *oarg, ch;          char *host, *arg, *oarg;
         int where = opcode == sPermitOpen ? FORWARD_LOCAL : FORWARD_REMOTE;          int where = opcode == sPermitOpen ? FORWARD_LOCAL : FORWARD_REMOTE;
         const char *what = lookup_opcode_name(opcode);          const char *what = lookup_opcode_name(opcode);
   
Line 862 
Line 862 
         /* Otherwise treat it as a list of permitted host:port */          /* Otherwise treat it as a list of permitted host:port */
         for (i = 0; i < num_opens; i++) {          for (i = 0; i < num_opens; i++) {
                 oarg = arg = xstrdup(opens[i]);                  oarg = arg = xstrdup(opens[i]);
                 ch = '\0';                  host = hpdelim(&arg);
                 host = hpdelim2(&arg, &ch);                  if (host == NULL)
                 if (host == NULL || ch == '/')  
                         fatal_f("missing host in %s", what);                          fatal_f("missing host in %s", what);
                 host = cleanhostname(host);                  host = cleanhostname(host);
                 if (arg == NULL || ((port = permitopen_port(arg)) < 0))                  if (arg == NULL || ((port = permitopen_port(arg)) < 0))
Line 1210 
Line 1209 
     struct connection_info *connectinfo, int *inc_flags, int depth,      struct connection_info *connectinfo, int *inc_flags, int depth,
     struct include_list *includes)      struct include_list *includes)
 {  {
         char ch, *str, ***chararrayptr, **charptr, *arg, *arg2, *p, *keyword;          char *str, ***chararrayptr, **charptr, *arg, *arg2, *p, *keyword;
         int cmdline = 0, *intptr, value, value2, n, port, oactive, r, found;          int cmdline = 0, *intptr, value, value2, n, port, oactive, r, found;
         SyslogFacility *log_facility_ptr;          SyslogFacility *log_facility_ptr;
         LogLevel *log_level_ptr;          LogLevel *log_level_ptr;
Line 1323 
Line 1322 
                         p = arg;                          p = arg;
                 } else {                  } else {
                         arg2 = NULL;                          arg2 = NULL;
                         ch = '\0';                          p = hpdelim(&arg);
                         p = hpdelim2(&arg, &ch);                          if (p == NULL)
                         if (p == NULL || ch == '/')  
                                 fatal("%s line %d: bad address:port usage",                                  fatal("%s line %d: bad address:port usage",
                                     filename, linenum);                                      filename, linenum);
                         p = cleanhostname(p);                          p = cleanhostname(p);
Line 2154 
Line 2152 
                                 xasprintf(&arg2, "*:%s", arg);                                  xasprintf(&arg2, "*:%s", arg);
                         } else {                          } else {
                                 arg2 = xstrdup(arg);                                  arg2 = xstrdup(arg);
                                 ch = '\0';                                  p = hpdelim(&arg);
                                 p = hpdelim2(&arg, &ch);                                  if (p == NULL) {
                                 if (p == NULL || ch == '/') {  
                                         fatal("%s line %d: %s missing host",                                          fatal("%s line %d: %s missing host",
                                             filename, linenum, keyword);                                              filename, linenum, keyword);
                                 }                                  }

Legend:
Removed from v.1.382  
changed lines
  Added in v.1.383