summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--channels.c14
2 files changed, 12 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 6171fe111..45b878ad6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@
6 -v is also specified, making it consistent with the manual and other 6 -v is also specified, making it consistent with the manual and other
7 uses of -l. 7 uses of -l.
8 ok grunk@ 8 ok grunk@
9 - djm@cvs.openbsd.org 2008/07/13 22:13:07
10 [channels.c]
11 use struct sockaddr_storage instead of struct sockaddr for accept(2)
12 address argument. from visibilis AT yahoo.com in bz#1485; ok markus@
9 13
1020080712 1420080712
11 - (djm) OpenBSD CVS Sync 15 - (djm) OpenBSD CVS Sync
@@ -4642,4 +4646,4 @@
4642 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4646 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4643 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4647 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4644 4648
4645$Id: ChangeLog,v 1.5076 2008/07/14 01:28:29 djm Exp $ 4649$Id: ChangeLog,v 1.5077 2008/07/14 01:28:58 djm Exp $
diff --git a/channels.c b/channels.c
index 7be577838..0156e9cb8 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.284 2008/07/12 04:52:50 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.285 2008/07/13 22:13:07 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1210,7 +1210,7 @@ static void
1210channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset) 1210channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset)
1211{ 1211{
1212 Channel *nc; 1212 Channel *nc;
1213 struct sockaddr addr; 1213 struct sockaddr_storage addr;
1214 int newsock; 1214 int newsock;
1215 socklen_t addrlen; 1215 socklen_t addrlen;
1216 char buf[16384], *remote_ipaddr; 1216 char buf[16384], *remote_ipaddr;
@@ -1219,7 +1219,7 @@ channel_post_x11_listener(Channel *c, fd_set *readset, fd_set *writeset)
1219 if (FD_ISSET(c->sock, readset)) { 1219 if (FD_ISSET(c->sock, readset)) {
1220 debug("X11 connection requested."); 1220 debug("X11 connection requested.");
1221 addrlen = sizeof(addr); 1221 addrlen = sizeof(addr);
1222 newsock = accept(c->sock, &addr, &addrlen); 1222 newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
1223 if (c->single_connection) { 1223 if (c->single_connection) {
1224 debug2("single_connection: closing X11 listener."); 1224 debug2("single_connection: closing X11 listener.");
1225 channel_close_fd(&c->sock); 1225 channel_close_fd(&c->sock);
@@ -1336,7 +1336,7 @@ static void
1336channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset) 1336channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset)
1337{ 1337{
1338 Channel *nc; 1338 Channel *nc;
1339 struct sockaddr addr; 1339 struct sockaddr_storage addr;
1340 int newsock, nextstate; 1340 int newsock, nextstate;
1341 socklen_t addrlen; 1341 socklen_t addrlen;
1342 char *rtype; 1342 char *rtype;
@@ -1360,7 +1360,7 @@ channel_post_port_listener(Channel *c, fd_set *readset, fd_set *writeset)
1360 } 1360 }
1361 1361
1362 addrlen = sizeof(addr); 1362 addrlen = sizeof(addr);
1363 newsock = accept(c->sock, &addr, &addrlen); 1363 newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
1364 if (newsock < 0) { 1364 if (newsock < 0) {
1365 error("accept: %.100s", strerror(errno)); 1365 error("accept: %.100s", strerror(errno));
1366 return; 1366 return;
@@ -1395,12 +1395,12 @@ channel_post_auth_listener(Channel *c, fd_set *readset, fd_set *writeset)
1395{ 1395{
1396 Channel *nc; 1396 Channel *nc;
1397 int newsock; 1397 int newsock;
1398 struct sockaddr addr; 1398 struct sockaddr_storage addr;
1399 socklen_t addrlen; 1399 socklen_t addrlen;
1400 1400
1401 if (FD_ISSET(c->sock, readset)) { 1401 if (FD_ISSET(c->sock, readset)) {
1402 addrlen = sizeof(addr); 1402 addrlen = sizeof(addr);
1403 newsock = accept(c->sock, &addr, &addrlen); 1403 newsock = accept(c->sock, (struct sockaddr *)&addr, &addrlen);
1404 if (newsock < 0) { 1404 if (newsock < 0) {
1405 error("accept from auth socket: %.100s", strerror(errno)); 1405 error("accept from auth socket: %.100s", strerror(errno));
1406 return; 1406 return;