summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ssh/ssh-socks5-proxy-connect
diff options
context:
space:
mode:
authorjp161948 <none@none>2007-12-05 05:48:59 -0800
committerjp161948 <none@none>2007-12-05 05:48:59 -0800
commit743541abe0006f1be576e21a976c36fb2e87accc (patch)
treeec0b61e1ad2f7a1f4ce31a88d3e5adc03b9b13d5 /usr/src/cmd/ssh/ssh-socks5-proxy-connect
parentcfae96c24c7523c74c9efb583764b812b6b309c5 (diff)
downloadillumos-joyent-743541abe0006f1be576e21a976c36fb2e87accc.tar.gz
6496972 misleading error message is printed if X11 forwarding setup fails
6504798 ssh fails for users when ngroups_max=32 6631713 ssh-socks5-proxy-connect is too greedy during initial negotiation 6635397 remove bsd-nextstep files from SunSSH --HG-- rename : usr/src/cmd/ssh/include/bsd-nextstep.h => deleted_files/usr/src/cmd/ssh/include/bsd-nextstep.h rename : usr/src/cmd/ssh/libopenbsd-compat/common/bsd-nextstep.c => deleted_files/usr/src/cmd/ssh/libopenbsd-compat/common/bsd-nextstep.c
Diffstat (limited to 'usr/src/cmd/ssh/ssh-socks5-proxy-connect')
-rw-r--r--usr/src/cmd/ssh/ssh-socks5-proxy-connect/ssh-socks5-proxy-connect.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/usr/src/cmd/ssh/ssh-socks5-proxy-connect/ssh-socks5-proxy-connect.c b/usr/src/cmd/ssh/ssh-socks5-proxy-connect/ssh-socks5-proxy-connect.c
index d8ee2c54b8..131eb73fcc 100644
--- a/usr/src/cmd/ssh/ssh-socks5-proxy-connect/ssh-socks5-proxy-connect.c
+++ b/usr/src/cmd/ssh/ssh-socks5-proxy-connect/ssh-socks5-proxy-connect.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -19,7 +18,7 @@
*
* CDDL HEADER END
*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -159,7 +158,16 @@ send_request(
exit(1);
}
- if (read(sockfd, &recv_buf, sizeof (recv_buf)) == -1) {
+ /*
+ * The maximum size of the protocol message we are waiting for is 10
+ * bytes -- VER[1], REP[1], RSV[1], ATYP[1], BND.ADDR[4] and
+ * BND.PORT[2]; see RFC 1928, section "6. Replies" for more details.
+ * Everything else is already a part of the data we are supposed to
+ * deliver to the requester. We know that BND.ADDR is exactly 4 bytes
+ * since as you can see below, we accept only ATYP == 1 which specifies
+ * that the IPv4 address is in a binary format.
+ */
+ if (read(sockfd, &recv_buf, 10) == -1) {
perror("read");
exit(1);
}