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

Diff for /src/usr.bin/ssh/authfd.c between version 1.63 and 1.63.2.1

version 1.63, 2003/11/21 11:57:03 version 1.63.2.1, 2004/08/19 04:13:26
Line 133 
Line 133 
          * Wait for response from the agent.  First read the length of the           * Wait for response from the agent.  First read the length of the
          * response packet.           * response packet.
          */           */
         len = 4;          if (atomicio(read, auth->fd, buf, 4) != 4) {
         while (len > 0) {              error("Error reading response length from authentication socket.");
                 l = read(auth->fd, buf + 4 - len, len);              return 0;
                 if (l == -1 && (errno == EAGAIN || errno == EINTR))  
                         continue;  
                 if (l <= 0) {  
                         error("Error reading response length from authentication socket.");  
                         return 0;  
                 }  
                 len -= l;  
         }          }
   
         /* Extract the length, and check it for sanity. */          /* Extract the length, and check it for sanity. */
Line 156 
Line 149 
                 l = len;                  l = len;
                 if (l > sizeof(buf))                  if (l > sizeof(buf))
                         l = sizeof(buf);                          l = sizeof(buf);
                 l = read(auth->fd, buf, l);                  l = atomicio(read, auth->fd, buf, l);
                 if (l == -1 && (errno == EAGAIN || errno == EINTR))  
                         continue;  
                 if (l <= 0) {                  if (l <= 0) {
                         error("Error reading response from authentication socket.");                          error("Error reading response from authentication socket.");
                         return 0;                          return 0;

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.63.2.1