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

Diff for /src/usr.bin/ssh/ssh.c between version 1.427 and 1.428

version 1.427, 2015/10/15 23:51:40 version 1.428, 2015/10/16 18:40:49
Line 389 
Line 389 
                 return addrs;                  return addrs;
         }          }
   
           /* If domain name is anchored, then resolve it now */
           if ((*hostp)[strlen(*hostp) - 1] == '.') {
                   debug3("%s: name is fully qualified", __func__);
                   fullhost = xstrdup(*hostp);
                   if ((addrs = resolve_host(fullhost, port, 0,
                       newname, sizeof(newname))) != NULL)
                           goto found;
                   free(fullhost);
                   goto notfound;
           }
   
         /* Don't apply canonicalization to sufficiently-qualified hostnames */          /* Don't apply canonicalization to sufficiently-qualified hostnames */
         ndots = 0;          ndots = 0;
         for (cp = *hostp; *cp != '\0'; cp++) {          for (cp = *hostp; *cp != '\0'; cp++) {
Line 412 
Line 423 
                         free(fullhost);                          free(fullhost);
                         continue;                          continue;
                 }                  }
    found:
                 /* Remove trailing '.' */                  /* Remove trailing '.' */
                 fullhost[strlen(fullhost) - 1] = '\0';                  fullhost[strlen(fullhost) - 1] = '\0';
                 /* Follow CNAME if requested */                  /* Follow CNAME if requested */
Line 423 
Line 435 
                 *hostp = fullhost;                  *hostp = fullhost;
                 return addrs;                  return addrs;
         }          }
    notfound:
         if (!options.canonicalize_fallback_local)          if (!options.canonicalize_fallback_local)
                 fatal("%s: Could not resolve host \"%s\"", __progname, *hostp);                  fatal("%s: Could not resolve host \"%s\"", __progname, *hostp);
         debug2("%s: host %s not found in any suffix", __func__, *hostp);          debug2("%s: host %s not found in any suffix", __func__, *hostp);

Legend:
Removed from v.1.427  
changed lines
  Added in v.1.428