diff options
author | Brent Cook <bcook@openbsd.org> | 2015-12-28 08:46:59 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-12-28 08:46:59 -0600 |
commit | f5a4ee56befe8a13010e09624823f21d3be75aab (patch) | |
tree | 25ceeba6dbe9309b5c2c7001f17164e8b46a0ace /patches/netcat.c.patch | |
parent | 4a931b58fc6c9a20e37841140019032f4536a0ba (diff) | |
download | portable-f5a4ee56befe8a13010e09624823f21d3be75aab.tar.gz portable-f5a4ee56befe8a13010e09624823f21d3be75aab.tar.bz2 portable-f5a4ee56befe8a13010e09624823f21d3be75aab.zip |
rebase netcat patch
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r-- | patches/netcat.c.patch | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 86cd9ae..3719681 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- apps/nc/netcat.c.orig Sun Dec 6 22:05:45 2015 | 1 | --- apps/nc/netcat.c.orig Mon Dec 28 08:46:10 2015 |
2 | +++ apps/nc/netcat.c Mon Dec 7 07:52:00 2015 | 2 | +++ apps/nc/netcat.c Mon Dec 28 08:46:19 2015 |
3 | @@ -57,6 +57,10 @@ | 3 | @@ -57,6 +57,10 @@ |
4 | #include <tls.h> | 4 | #include <tls.h> |
5 | #include "atomicio.h" | 5 | #include "atomicio.h" |
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | int usetls; /* use TLS */ | 36 | int usetls; /* use TLS */ |
37 | char *Cflag; /* Public cert file */ | 37 | char *Cflag; /* Public cert file */ |
38 | @@ -144,7 +154,7 @@ | 38 | @@ -150,7 +160,7 @@ |
39 | struct servent *sv; | 39 | struct servent *sv; |
40 | socklen_t len; | 40 | socklen_t len; |
41 | struct sockaddr_storage cliaddr; | 41 | struct sockaddr_storage cliaddr; |
@@ -44,7 +44,7 @@ | |||
44 | const char *errstr, *proxyhost = "", *proxyport = NULL; | 44 | const char *errstr, *proxyhost = "", *proxyport = NULL; |
45 | struct addrinfo proxyhints; | 45 | struct addrinfo proxyhints; |
46 | char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; | 46 | char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; |
47 | @@ -245,12 +255,14 @@ | 47 | @@ -251,12 +261,14 @@ |
48 | case 'u': | 48 | case 'u': |
49 | uflag = 1; | 49 | uflag = 1; |
50 | break; | 50 | break; |
@@ -59,7 +59,7 @@ | |||
59 | case 'v': | 59 | case 'v': |
60 | vflag = 1; | 60 | vflag = 1; |
61 | break; | 61 | break; |
62 | @@ -283,9 +295,11 @@ | 62 | @@ -289,9 +301,11 @@ |
63 | errx(1, "TCP send window %s: %s", | 63 | errx(1, "TCP send window %s: %s", |
64 | errstr, optarg); | 64 | errstr, optarg); |
65 | break; | 65 | break; |
@@ -71,7 +71,7 @@ | |||
71 | case 'T': | 71 | case 'T': |
72 | errstr = NULL; | 72 | errstr = NULL; |
73 | errno = 0; | 73 | errno = 0; |
74 | @@ -309,9 +323,11 @@ | 74 | @@ -315,9 +329,11 @@ |
75 | argc -= optind; | 75 | argc -= optind; |
76 | argv += optind; | 76 | argv += optind; |
77 | 77 | ||
@@ -83,7 +83,7 @@ | |||
83 | 83 | ||
84 | if (family == AF_UNIX) { | 84 | if (family == AF_UNIX) { |
85 | if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) | 85 | if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) |
86 | @@ -444,7 +460,10 @@ | 86 | @@ -460,7 +476,10 @@ |
87 | errx(1, "-H and -T noverify may not be used" | 87 | errx(1, "-H and -T noverify may not be used" |
88 | "together"); | 88 | "together"); |
89 | tls_config_insecure_noverifycert(tls_cfg); | 89 | tls_config_insecure_noverifycert(tls_cfg); |
@@ -95,7 +95,7 @@ | |||
95 | } | 95 | } |
96 | if (lflag) { | 96 | if (lflag) { |
97 | struct tls *tls_cctx = NULL; | 97 | struct tls *tls_cctx = NULL; |
98 | @@ -791,7 +810,10 @@ | 98 | @@ -807,7 +826,10 @@ |
99 | remote_connect(const char *host, const char *port, struct addrinfo hints) | 99 | remote_connect(const char *host, const char *port, struct addrinfo hints) |
100 | { | 100 | { |
101 | struct addrinfo *res, *res0; | 101 | struct addrinfo *res, *res0; |
@@ -107,7 +107,7 @@ | |||
107 | 107 | ||
108 | if ((error = getaddrinfo(host, port, &hints, &res))) | 108 | if ((error = getaddrinfo(host, port, &hints, &res))) |
109 | errx(1, "getaddrinfo: %s", gai_strerror(error)); | 109 | errx(1, "getaddrinfo: %s", gai_strerror(error)); |
110 | @@ -806,8 +828,10 @@ | 110 | @@ -822,8 +844,10 @@ |
111 | if (sflag || pflag) { | 111 | if (sflag || pflag) { |
112 | struct addrinfo ahints, *ares; | 112 | struct addrinfo ahints, *ares; |
113 | 113 | ||
@@ -118,7 +118,7 @@ | |||
118 | memset(&ahints, 0, sizeof(struct addrinfo)); | 118 | memset(&ahints, 0, sizeof(struct addrinfo)); |
119 | ahints.ai_family = res0->ai_family; | 119 | ahints.ai_family = res0->ai_family; |
120 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; | 120 | ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; |
121 | @@ -876,7 +900,10 @@ | 121 | @@ -892,7 +916,10 @@ |
122 | local_listen(char *host, char *port, struct addrinfo hints) | 122 | local_listen(char *host, char *port, struct addrinfo hints) |
123 | { | 123 | { |
124 | struct addrinfo *res, *res0; | 124 | struct addrinfo *res, *res0; |
@@ -130,7 +130,7 @@ | |||
130 | int error; | 130 | int error; |
131 | 131 | ||
132 | /* Allow nodename to be null. */ | 132 | /* Allow nodename to be null. */ |
133 | @@ -898,9 +925,11 @@ | 133 | @@ -914,9 +941,11 @@ |
134 | res0->ai_protocol)) < 0) | 134 | res0->ai_protocol)) < 0) |
135 | continue; | 135 | continue; |
136 | 136 | ||
@@ -142,7 +142,7 @@ | |||
142 | 142 | ||
143 | set_common_sockopts(s, res0->ai_family); | 143 | set_common_sockopts(s, res0->ai_family); |
144 | 144 | ||
145 | @@ -1340,11 +1369,13 @@ | 145 | @@ -1356,11 +1385,13 @@ |
146 | { | 146 | { |
147 | int x = 1; | 147 | int x = 1; |
148 | 148 | ||
@@ -156,7 +156,7 @@ | |||
156 | if (Dflag) { | 156 | if (Dflag) { |
157 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, | 157 | if (setsockopt(s, SOL_SOCKET, SO_DEBUG, |
158 | &x, sizeof(x)) == -1) | 158 | &x, sizeof(x)) == -1) |
159 | @@ -1519,14 +1550,22 @@ | 159 | @@ -1538,14 +1569,22 @@ |
160 | \t-P proxyuser\tUsername for proxy authentication\n\ | 160 | \t-P proxyuser\tUsername for proxy authentication\n\ |
161 | \t-p port\t Specify local port for remote connects\n\ | 161 | \t-p port\t Specify local port for remote connects\n\ |
162 | \t-R CAfile CA bundle\n\ | 162 | \t-R CAfile CA bundle\n\ |