aboutsummaryrefslogtreecommitdiff
path: root/patches/netcat.c.patch
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2017-07-17 06:13:21 -0500
committerBrent Cook <bcook@openbsd.org>2017-07-17 06:13:21 -0500
commit5ec2c381e4ac48e588a093be5faf04919523da32 (patch)
treeaedc96516bac0877fbbc5184c520497b08b1aad3 /patches/netcat.c.patch
parent86434e03e869d4ccd40432e39c717ca4e7085453 (diff)
downloadportable-5ec2c381e4ac48e588a093be5faf04919523da32.tar.gz
portable-5ec2c381e4ac48e588a093be5faf04919523da32.tar.bz2
portable-5ec2c381e4ac48e588a093be5faf04919523da32.zip
rebase patches on latest, remove fuzz
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r--patches/netcat.c.patch28
1 files changed, 14 insertions, 14 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch
index 7160d4c..7ba6b5f 100644
--- a/patches/netcat.c.patch
+++ b/patches/netcat.c.patch
@@ -1,5 +1,5 @@
1--- apps/nc/netcat.c.orig 2017-07-07 00:10:09.009409624 +0900 1--- apps/nc/netcat.c.orig Mon Jul 17 06:06:51 2017
2+++ apps/nc/netcat.c 2017-07-07 00:30:32.380088772 +0900 2+++ apps/nc/netcat.c Mon Jul 17 06:11:24 2017
3@@ -66,7 +66,9 @@ 3@@ -66,7 +66,9 @@
4 #define POLL_NETIN 2 4 #define POLL_NETIN 2
5 #define POLL_STDOUT 3 5 #define POLL_STDOUT 3
@@ -10,7 +10,7 @@
10 10
11 #define TLS_ALL (1 << 1) 11 #define TLS_ALL (1 << 1)
12 #define TLS_NOVERIFY (1 << 2) 12 #define TLS_NOVERIFY (1 << 2)
13@@ -94,9 +96,13 @@ int zflag; /* Port Scan Flag */ 13@@ -95,9 +97,13 @@
14 int Dflag; /* sodebug */ 14 int Dflag; /* sodebug */
15 int Iflag; /* TCP receive buffer size */ 15 int Iflag; /* TCP receive buffer size */
16 int Oflag; /* TCP send buffer size */ 16 int Oflag; /* TCP send buffer size */
@@ -24,7 +24,7 @@
24 24
25 int usetls; /* use TLS */ 25 int usetls; /* use TLS */
26 char *Cflag; /* Public cert file */ 26 char *Cflag; /* Public cert file */
27@@ -265,12 +271,14 @@ main(int argc, char *argv[]) 27@@ -266,12 +272,14 @@
28 case 'u': 28 case 'u':
29 uflag = 1; 29 uflag = 1;
30 break; 30 break;
@@ -39,7 +39,7 @@
39 case 'v': 39 case 'v':
40 vflag = 1; 40 vflag = 1;
41 break; 41 break;
42@@ -317,9 +325,11 @@ main(int argc, char *argv[]) 42@@ -318,9 +326,11 @@
43 case 'o': 43 case 'o':
44 oflag = optarg; 44 oflag = optarg;
45 break; 45 break;
@@ -51,7 +51,7 @@
51 case 'T': 51 case 'T':
52 errstr = NULL; 52 errstr = NULL;
53 errno = 0; 53 errno = 0;
54@@ -343,9 +353,11 @@ main(int argc, char *argv[]) 54@@ -344,9 +354,11 @@
55 argc -= optind; 55 argc -= optind;
56 argv += optind; 56 argv += optind;
57 57
@@ -63,7 +63,7 @@
63 63
64 if (family == AF_UNIX) { 64 if (family == AF_UNIX) {
65 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) 65 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
66@@ -888,7 +900,10 @@ int 66@@ -892,7 +904,10 @@
67 remote_connect(const char *host, const char *port, struct addrinfo hints) 67 remote_connect(const char *host, const char *port, struct addrinfo hints)
68 { 68 {
69 struct addrinfo *res, *res0; 69 struct addrinfo *res, *res0;
@@ -75,7 +75,7 @@
75 75
76 if ((error = getaddrinfo(host, port, &hints, &res0))) 76 if ((error = getaddrinfo(host, port, &hints, &res0)))
77 errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, 77 errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
78@@ -903,8 +918,10 @@ remote_connect(const char *host, const c 78@@ -907,8 +922,10 @@
79 if (sflag || pflag) { 79 if (sflag || pflag) {
80 struct addrinfo ahints, *ares; 80 struct addrinfo ahints, *ares;
81 81
@@ -86,7 +86,7 @@
86 memset(&ahints, 0, sizeof(struct addrinfo)); 86 memset(&ahints, 0, sizeof(struct addrinfo));
87 ahints.ai_family = res->ai_family; 87 ahints.ai_family = res->ai_family;
88 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; 88 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
89@@ -975,7 +992,10 @@ int 89@@ -979,7 +996,10 @@
90 local_listen(char *host, char *port, struct addrinfo hints) 90 local_listen(char *host, char *port, struct addrinfo hints)
91 { 91 {
92 struct addrinfo *res, *res0; 92 struct addrinfo *res, *res0;
@@ -98,7 +98,7 @@
98 int error; 98 int error;
99 99
100 /* Allow nodename to be null. */ 100 /* Allow nodename to be null. */
101@@ -996,9 +1016,11 @@ local_listen(char *host, char *port, str 101@@ -1000,9 +1020,11 @@
102 res->ai_protocol)) < 0) 102 res->ai_protocol)) < 0)
103 continue; 103 continue;
104 104
@@ -110,7 +110,7 @@
110 110
111 set_common_sockopts(s, res->ai_family); 111 set_common_sockopts(s, res->ai_family);
112 112
113@@ -1454,11 +1476,13 @@ set_common_sockopts(int s, int af) 113@@ -1458,11 +1480,13 @@
114 { 114 {
115 int x = 1; 115 int x = 1;
116 116
@@ -124,7 +124,7 @@
124 if (Dflag) { 124 if (Dflag) {
125 if (setsockopt(s, SOL_SOCKET, SO_DEBUG, 125 if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
126 &x, sizeof(x)) == -1) 126 &x, sizeof(x)) == -1)
127@@ -1469,9 +1493,16 @@ set_common_sockopts(int s, int af) 127@@ -1473,9 +1497,16 @@
128 IP_TOS, &Tflag, sizeof(Tflag)) == -1) 128 IP_TOS, &Tflag, sizeof(Tflag)) == -1)
129 err(1, "set IP ToS"); 129 err(1, "set IP ToS");
130 130
@@ -141,7 +141,7 @@
141 } 141 }
142 if (Iflag) { 142 if (Iflag) {
143 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, 143 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
144@@ -1495,13 +1526,17 @@ set_common_sockopts(int s, int af) 144@@ -1499,13 +1530,17 @@
145 } 145 }
146 146
147 if (minttl != -1) { 147 if (minttl != -1) {
@@ -160,7 +160,7 @@
160 } 160 }
161 } 161 }
162 162
163@@ -1709,14 +1744,22 @@ help(void) 163@@ -1714,14 +1749,22 @@
164 \t-P proxyuser\tUsername for proxy authentication\n\ 164 \t-P proxyuser\tUsername for proxy authentication\n\
165 \t-p port\t Specify local port for remote connects\n\ 165 \t-p port\t Specify local port for remote connects\n\
166 \t-R CAfile CA bundle\n\ 166 \t-R CAfile CA bundle\n\