version 1.14, 1999/10/16 20:47:13 |
version 1.15, 1999/10/16 21:19:00 |
|
|
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, |
|
|
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); |
|
|
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]; |
|
|
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); |