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

Diff for /src/usr.bin/ssh/sshconnect.c between version 1.178 and 1.179

version 1.178, 2006/03/20 18:42:27 version 1.179, 2006/03/25 00:05:41
Line 62 
Line 62 
         int pin[2], pout[2];          int pin[2], pout[2];
         pid_t pid;          pid_t pid;
         char strport[NI_MAXSERV];          char strport[NI_MAXSERV];
         size_t len;  
   
         /* Convert the port number into a string. */          /* Convert the port number into a string. */
         snprintf(strport, sizeof strport, "%hu", port);          snprintf(strport, sizeof strport, "%hu", port);
Line 74 
Line 73 
          * Use "exec" to avoid "sh -c" processes on some platforms           * Use "exec" to avoid "sh -c" processes on some platforms
          * (e.g. Solaris)           * (e.g. Solaris)
          */           */
         len = strlen(proxy_command) + 6;          xasprintf(&tmp, "exec %s", proxy_command);
         tmp = xmalloc(len);  
         strlcpy(tmp, "exec ", len);  
         strlcat(tmp, proxy_command, len);  
         command_string = percent_expand(tmp, "h", host,          command_string = percent_expand(tmp, "h", host,
             "p", strport, (char *)NULL);              "p", strport, (char *)NULL);
         xfree(tmp);          xfree(tmp);
Line 205 
Line 201 
         fd_set *fdset;          fd_set *fdset;
         struct timeval tv;          struct timeval tv;
         socklen_t optlen;          socklen_t optlen;
         int fdsetsz, optval, rc, result = -1;          int optval, rc, result = -1;
   
         if (timeout <= 0)          if (timeout <= 0)
                 return (connect(sockfd, serv_addr, addrlen));                  return (connect(sockfd, serv_addr, addrlen));
Line 219 
Line 215 
         if (errno != EINPROGRESS)          if (errno != EINPROGRESS)
                 return (-1);                  return (-1);
   
         fdsetsz = howmany(sockfd + 1, NFDBITS) * sizeof(fd_mask);          fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS),
         fdset = (fd_set *)xmalloc(fdsetsz);              sizeof(fd_mask));
   
         memset(fdset, 0, fdsetsz);  
         FD_SET(sockfd, fdset);          FD_SET(sockfd, fdset);
         tv.tv_sec = timeout;          tv.tv_sec = timeout;
         tv.tv_usec = 0;          tv.tv_usec = 0;
Line 947 
Line 941 
                 return;                  return;
         }          }
         size = roundup(strlen(password) + 1, 32);          size = roundup(strlen(password) + 1, 32);
         padded = xmalloc(size);          padded = xcalloc(1, size);
         memset(padded, 0, size);  
         strlcpy(padded, password, size);          strlcpy(padded, password, size);
         packet_put_string(padded, size);          packet_put_string(padded, size);
         memset(padded, 0, size);          memset(padded, 0, size);

Legend:
Removed from v.1.178  
changed lines
  Added in v.1.179