[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.316 and 1.317

version 1.316, 2008/06/12 04:24:06 version 1.317, 2008/06/12 16:35:31
Line 632 
Line 632 
         if (options.user == NULL)          if (options.user == NULL)
                 options.user = xstrdup(pw->pw_name);                  options.user = xstrdup(pw->pw_name);
   
           /* Get default port if port has not been set. */
           if (options.port == 0) {
                   sp = getservbyname(SSH_SERVICE_NAME, "tcp");
                   options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;
           }
   
           if (options.local_command != NULL) {
                   char thishost[NI_MAXHOST];
   
                   if (gethostname(thishost, sizeof(thishost)) == -1)
                           fatal("gethostname: %s", strerror(errno));
                   snprintf(buf, sizeof(buf), "%d", options.port);
                   debug3("expanding LocalCommand: %s", options.local_command);
                   cp = options.local_command;
                   options.local_command = percent_expand(cp, "d", pw->pw_dir,
                       "h", options.hostname? options.hostname : host,
                       "l", thishost, "n", host, "r", options.user, "p", buf,
                       "u", pw->pw_name, (char *)NULL);
                   debug3("expanded LocalCommand: %s", options.local_command);
                   xfree(cp);
           }
   
         if (options.hostname != NULL)          if (options.hostname != NULL)
                 host = options.hostname;                  host = options.hostname;
   
Line 640 
Line 662 
                 for (p = options.host_key_alias; *p; p++)                  for (p = options.host_key_alias; *p; p++)
                         if (isupper(*p))                          if (isupper(*p))
                                 *p = (char)tolower(*p);                                  *p = (char)tolower(*p);
         }  
   
         /* Get default port if port has not been set. */  
         if (options.port == 0) {  
                 sp = getservbyname(SSH_SERVICE_NAME, "tcp");  
                 options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;  
         }          }
   
         if (options.proxy_command != NULL &&          if (options.proxy_command != NULL &&

Legend:
Removed from v.1.316  
changed lines
  Added in v.1.317