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

Diff for /src/usr.bin/ssh/channels.c between version 1.14 and 1.15

version 1.14, 1999/10/16 20:47:13 version 1.15, 1999/10/16 21:19:00
Line 378 
Line 378 
                   break;                    break;
                 }                  }
               remote_hostname = get_remote_hostname(newsock);                remote_hostname = get_remote_hostname(newsock);
               sprintf(buf, "X11 connection from %.200s port %d",                snprintf(buf, sizeof buf, "X11 connection from %.200s port %d",
                       remote_hostname, get_peer_port(newsock));                        remote_hostname, get_peer_port(newsock));
               xfree(remote_hostname);                xfree(remote_hostname);
               newch = channel_allocate(SSH_CHANNEL_OPENING, newsock,                newch = channel_allocate(SSH_CHANNEL_OPENING, newsock,
Line 406 
Line 406 
                   break;                    break;
                 }                  }
               remote_hostname = get_remote_hostname(newsock);                remote_hostname = get_remote_hostname(newsock);
               sprintf(buf, "port %d, connection from %.200s port %d",                snprintf(buf, sizeof buf, "port %d, connection from %.200s port %d",
                       ch->listening_port, remote_hostname,                        ch->listening_port, remote_hostname,
                       get_peer_port(newsock));                        get_peer_port(newsock));
               xfree(remote_hostname);                xfree(remote_hostname);
Line 818 
Line 818 
   char buf[512], *cp;    char buf[512], *cp;
   
   buffer_init(&buffer);    buffer_init(&buffer);
   sprintf(buf, "The following connections are open:\r\n");    snprintf(buf, sizeof buf, "The following connections are open:\r\n");
   buffer_append(&buffer, buf, strlen(buf));    buffer_append(&buffer, buf, strlen(buf));
   for (i = 0; i < channels_alloc; i++){    for (i = 0; i < channels_alloc; i++){
     Channel *c=&channels[i];      Channel *c=&channels[i];
Line 1165 
Line 1165 
         error("socket: %.100s", strerror(errno));          error("socket: %.100s", strerror(errno));
       memset(&addr, 0, sizeof(addr));        memset(&addr, 0, sizeof(addr));
       addr.sun_family = AF_UNIX;        addr.sun_family = AF_UNIX;
       sprintf(addr.sun_path, *path, dnr);        snprintf(addr.sun_path, sizeof addr.sun_path, *path, dnr);
       if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0)        if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0)
         return sock;          return sock;
       close(sock);        close(sock);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15