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

Diff for /src/usr.bin/ssh/clientloop.c between version 1.6 and 1.7

version 1.6, 1999/09/30 08:34:24 version 1.7, 1999/10/16 20:57:52
Line 423 
Line 423 
       if (errno == EINTR)        if (errno == EINTR)
         return;          return;
       /* Note: we might still have data in the buffers. */        /* Note: we might still have data in the buffers. */
       sprintf(buf, "select: %.100s\r\n", strerror(errno));        snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno));
       buffer_append(&stderr_buffer, buf, strlen(buf));        buffer_append(&stderr_buffer, buf, strlen(buf));
       stderr_bytes += strlen(buf);        stderr_bytes += strlen(buf);
       quit_pending = 1;        quit_pending = 1;
Line 491 
Line 491 
       if (len == 0)        if (len == 0)
         {          {
           /* Received EOF.  The remote host has closed the connection. */            /* Received EOF.  The remote host has closed the connection. */
           sprintf(buf, "Connection to %.300s closed by remote host.\r\n",            snprintf(buf, sizeof buf, "Connection to %.300s closed by remote host.\r\n",
                   host);                    host);
           buffer_append(&stderr_buffer, buf, strlen(buf));            buffer_append(&stderr_buffer, buf, strlen(buf));
           stderr_bytes += strlen(buf);            stderr_bytes += strlen(buf);
Line 508 
Line 508 
         {          {
           /* An error has encountered.  Perhaps there is a network            /* An error has encountered.  Perhaps there is a network
              problem. */               problem. */
           sprintf(buf, "Read from remote host %.300s: %.100s\r\n",            snprintf(buf, sizeof buf, "Read from remote host %.300s: %.100s\r\n",
                   host, strerror(errno));                    host, strerror(errno));
           buffer_append(&stderr_buffer, buf, strlen(buf));            buffer_append(&stderr_buffer, buf, strlen(buf));
           stderr_bytes += strlen(buf);            stderr_bytes += strlen(buf);
Line 530 
Line 530 
              an error condition. */               an error condition. */
           if (len < 0)            if (len < 0)
             {              {
               sprintf(buf, "read: %.100s\r\n", strerror(errno));                snprintf(buf, sizeof buf, "read: %.100s\r\n", strerror(errno));
               buffer_append(&stderr_buffer, buf, strlen(buf));                buffer_append(&stderr_buffer, buf, strlen(buf));
               stderr_bytes += strlen(buf);                stderr_bytes += strlen(buf);
             }              }
Line 576 
Line 576 
                       {                        {
                       case '.':                        case '.':
                         /* Terminate the connection. */                          /* Terminate the connection. */
                         sprintf(buf, "%c.\r\n", escape_char);                          snprintf(buf, sizeof buf, "%c.\r\n", escape_char);
                         buffer_append(&stderr_buffer, buf, strlen(buf));                          buffer_append(&stderr_buffer, buf, strlen(buf));
                         stderr_bytes += strlen(buf);                          stderr_bytes += strlen(buf);
                         quit_pending = 1;                          quit_pending = 1;
Line 585 
Line 585 
                       case 'Z' - 64:                        case 'Z' - 64:
                           /* Suspend the program. */                            /* Suspend the program. */
                           /* Print a message to that effect to the user. */                            /* Print a message to that effect to the user. */
                           sprintf(buf, "%c^Z\r\n", escape_char);                            snprintf(buf, sizeof buf, "%c^Z\r\n", escape_char);
                           buffer_append(&stderr_buffer, buf, strlen(buf));                            buffer_append(&stderr_buffer, buf, strlen(buf));
                           stderr_bytes += strlen(buf);                            stderr_bytes += strlen(buf);
   
Line 640 
Line 640 
                         continue;                          continue;
   
                       case '?':                        case '?':
                         sprintf(buf, "%c?\r\n\                          snprintf(buf, sizeof buf, "%c?\r\n\
 Supported escape sequences:\r\n\  Supported escape sequences:\r\n\
 ~.  - terminate connection\r\n\  ~.  - terminate connection\r\n\
 ~^Z - suspend ssh\r\n\  ~^Z - suspend ssh\r\n\
Line 654 
Line 654 
                         continue;                          continue;
   
                       case '#':                        case '#':
                         sprintf(buf, "%c#\r\n", escape_char);                          snprintf(buf, sizeof buf, "%c#\r\n", escape_char);
                         buffer_append(&stderr_buffer, buf, strlen(buf));                          buffer_append(&stderr_buffer, buf, strlen(buf));
                         s = channel_open_message();                          s = channel_open_message();
                         buffer_append(&stderr_buffer, s, strlen(s));                          buffer_append(&stderr_buffer, s, strlen(s));
Line 723 
Line 723 
             {              {
               /* An error or EOF was encountered.  Put an error message                /* An error or EOF was encountered.  Put an error message
                  to stderr buffer. */                   to stderr buffer. */
               sprintf(buf, "write stdout: %.50s\r\n", strerror(errno));                snprintf(buf, sizeof buf, "write stdout: %.50s\r\n", strerror(errno));
               buffer_append(&stderr_buffer, buf, strlen(buf));                buffer_append(&stderr_buffer, buf, strlen(buf));
               stderr_bytes += strlen(buf);                stderr_bytes += strlen(buf);
               quit_pending = 1;                quit_pending = 1;
Line 868 
Line 868 
      the connection has been closed. */       the connection has been closed. */
   if (have_pty && !quiet_flag)    if (have_pty && !quiet_flag)
     {      {
       sprintf(buf, "Connection to %.64s closed.\r\n", host);        snprintf(buf, sizeof buf, "Connection to %.64s closed.\r\n", host);
       buffer_append(&stderr_buffer, buf, strlen(buf));        buffer_append(&stderr_buffer, buf, strlen(buf));
       stderr_bytes += strlen(buf);        stderr_bytes += strlen(buf);
     }      }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7