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