[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.346 and 1.347

version 1.346, 2019/01/19 21:37:48 version 1.347, 2019/01/23 21:50:56
Line 821 
Line 821 
 {  {
         u_int i;          u_int i;
         int port;          int port;
         char *host, *arg, *oarg;          char *host, *arg, *oarg, ch;
         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 839 
Line 839 
         /* 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]);
                 host = hpdelim(&arg);                  host = hpdelim2(&arg, &ch);
                 if (host == NULL)                  if (host == NULL || ch == '/')
                         fatal("%s: missing host in %s", __func__, what);                          fatal("%s: missing host in %s", __func__, what);
                 host = cleanhostname(host);                  host = cleanhostname(host);
                 if (arg == NULL || ((port = permitopen_port(arg)) < 0))                  if (arg == NULL || ((port = permitopen_port(arg)) < 0))
Line 1251 
Line 1251 
                         port = 0;                          port = 0;
                         p = arg;                          p = arg;
                 } else {                  } else {
                         p = hpdelim(&arg);                          char ch;
                         if (p == NULL)                          arg2 = NULL;
                           p = hpdelim2(&arg, &ch);
                           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 1879 
Line 1881 
                                  */                                   */
                                 xasprintf(&arg2, "*:%s", arg);                                  xasprintf(&arg2, "*:%s", arg);
                         } else {                          } else {
                                   char ch;
   
                                 arg2 = xstrdup(arg);                                  arg2 = xstrdup(arg);
                                 p = hpdelim(&arg);                                  p = hpdelim2(&arg, &ch);
                                 if (p == NULL) {                                  if (p == NULL || ch == '/') {
                                         fatal("%s line %d: missing host in %s",                                          fatal("%s line %d: missing host in %s",
                                             filename, linenum,                                              filename, linenum,
                                             lookup_opcode_name(opcode));                                              lookup_opcode_name(opcode));

Legend:
Removed from v.1.346  
changed lines
  Added in v.1.347