aboutsummaryrefslogtreecommitdiff
path: root/patches/netcat.c.patch
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2017-02-07 18:38:03 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2017-02-07 18:38:03 +0900
commit7383bf673b2dc2b093dd31038a6d43e2020f742b (patch)
tree6e5c911d6d05a8f1b2f1f70af94a736dc509b34d /patches/netcat.c.patch
parentb67d365454e3d35f775dda738697615094e81c4e (diff)
downloadportable-7383bf673b2dc2b093dd31038a6d43e2020f742b.tar.gz
portable-7383bf673b2dc2b093dd31038a6d43e2020f742b.tar.bz2
portable-7383bf673b2dc2b093dd31038a6d43e2020f742b.zip
Fix patch for netcat.c
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r--patches/netcat.c.patch44
1 files changed, 22 insertions, 22 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch
index 4d2f893..8d23e83 100644
--- a/patches/netcat.c.patch
+++ b/patches/netcat.c.patch
@@ -1,5 +1,5 @@
1--- apps/nc/netcat.c.orig Sat Nov 5 14:00:01 2016 1--- apps/nc/netcat.c.orig 2017-02-07 17:12:34.169650728 +0900
2+++ apps/nc/netcat.c Sat Nov 5 15:28:35 2016 2+++ apps/nc/netcat.c 2017-02-07 17:12:55.465651976 +0900
3@@ -65,7 +65,9 @@ 3@@ -65,7 +65,9 @@
4 #define POLL_NETIN 2 4 #define POLL_NETIN 2
5 #define POLL_STDOUT 3 5 #define POLL_STDOUT 3
@@ -8,9 +8,9 @@
8 #define DEFAULT_CA_FILE "/etc/ssl/cert.pem" 8 #define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
9+#endif 9+#endif
10 10
11 #define TLS_LEGACY (1 << 1) 11 #define TLS_ALL (1 << 1)
12 #define TLS_NOVERIFY (1 << 2) 12 #define TLS_NOVERIFY (1 << 2)
13@@ -93,9 +95,13 @@ 13@@ -93,9 +95,13 @@ int zflag; /* Port Scan Flag */
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,16 +24,16 @@
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@@ -148,7 +154,7 @@ 27@@ -148,7 +154,7 @@ main(int argc, char *argv[])
28 struct servent *sv; 28 struct servent *sv;
29 socklen_t len; 29 socklen_t len;
30 struct sockaddr_storage cliaddr; 30 struct sockaddr_storage cliaddr;
31- char *proxy; 31- char *proxy, *proxyport = NULL;
32+ char *proxy = NULL; 32+ char *proxy = NULL, *proxyport = NULL;
33 const char *errstr, *proxyhost = "", *proxyport = NULL; 33 const char *errstr;
34 struct addrinfo proxyhints; 34 struct addrinfo proxyhints;
35 char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; 35 char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
36@@ -258,12 +264,14 @@ 36@@ -258,12 +264,14 @@ main(int argc, char *argv[])
37 case 'u': 37 case 'u':
38 uflag = 1; 38 uflag = 1;
39 break; 39 break;
@@ -48,7 +48,7 @@
48 case 'v': 48 case 'v':
49 vflag = 1; 49 vflag = 1;
50 break; 50 break;
51@@ -299,9 +307,11 @@ 51@@ -299,9 +307,11 @@ main(int argc, char *argv[])
52 case 'o': 52 case 'o':
53 oflag = optarg; 53 oflag = optarg;
54 break; 54 break;
@@ -60,7 +60,7 @@
60 case 'T': 60 case 'T':
61 errstr = NULL; 61 errstr = NULL;
62 errno = 0; 62 errno = 0;
63@@ -325,9 +335,11 @@ 63@@ -325,9 +335,11 @@ main(int argc, char *argv[])
64 argc -= optind; 64 argc -= optind;
65 argv += optind; 65 argv += optind;
66 66
@@ -72,7 +72,7 @@
72 72
73 if (family == AF_UNIX) { 73 if (family == AF_UNIX) {
74 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) 74 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
75@@ -836,7 +848,10 @@ 75@@ -853,7 +865,10 @@ int
76 remote_connect(const char *host, const char *port, struct addrinfo hints) 76 remote_connect(const char *host, const char *port, struct addrinfo hints)
77 { 77 {
78 struct addrinfo *res, *res0; 78 struct addrinfo *res, *res0;
@@ -84,7 +84,7 @@
84 84
85 if ((error = getaddrinfo(host, port, &hints, &res0))) 85 if ((error = getaddrinfo(host, port, &hints, &res0)))
86 errx(1, "getaddrinfo: %s", gai_strerror(error)); 86 errx(1, "getaddrinfo: %s", gai_strerror(error));
87@@ -850,8 +865,10 @@ 87@@ -867,8 +882,10 @@ remote_connect(const char *host, const c
88 if (sflag || pflag) { 88 if (sflag || pflag) {
89 struct addrinfo ahints, *ares; 89 struct addrinfo ahints, *ares;
90 90
@@ -95,7 +95,7 @@
95 memset(&ahints, 0, sizeof(struct addrinfo)); 95 memset(&ahints, 0, sizeof(struct addrinfo));
96 ahints.ai_family = res->ai_family; 96 ahints.ai_family = res->ai_family;
97 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; 97 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
98@@ -922,7 +939,10 @@ 98@@ -939,7 +956,10 @@ int
99 local_listen(char *host, char *port, struct addrinfo hints) 99 local_listen(char *host, char *port, struct addrinfo hints)
100 { 100 {
101 struct addrinfo *res, *res0; 101 struct addrinfo *res, *res0;
@@ -107,7 +107,7 @@
107 int error; 107 int error;
108 108
109 /* Allow nodename to be null. */ 109 /* Allow nodename to be null. */
110@@ -943,9 +963,11 @@ 110@@ -960,9 +980,11 @@ local_listen(char *host, char *port, str
111 res->ai_protocol)) < 0) 111 res->ai_protocol)) < 0)
112 continue; 112 continue;
113 113
@@ -119,7 +119,7 @@
119 119
120 set_common_sockopts(s, res->ai_family); 120 set_common_sockopts(s, res->ai_family);
121 121
122@@ -1403,11 +1425,13 @@ 122@@ -1420,11 +1442,13 @@ set_common_sockopts(int s, int af)
123 { 123 {
124 int x = 1; 124 int x = 1;
125 125
@@ -133,7 +133,7 @@
133 if (Dflag) { 133 if (Dflag) {
134 if (setsockopt(s, SOL_SOCKET, SO_DEBUG, 134 if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
135 &x, sizeof(x)) == -1) 135 &x, sizeof(x)) == -1)
136@@ -1444,13 +1468,17 @@ 136@@ -1461,13 +1485,17 @@ set_common_sockopts(int s, int af)
137 } 137 }
138 138
139 if (minttl != -1) { 139 if (minttl != -1) {
@@ -152,7 +152,7 @@
152 } 152 }
153 } 153 }
154 154
155@@ -1644,14 +1672,22 @@ 155@@ -1661,14 +1689,22 @@ help(void)
156 \t-P proxyuser\tUsername for proxy authentication\n\ 156 \t-P proxyuser\tUsername for proxy authentication\n\
157 \t-p port\t Specify local port for remote connects\n\ 157 \t-p port\t Specify local port for remote connects\n\
158 \t-R CAfile CA bundle\n\ 158 \t-R CAfile CA bundle\n\
@@ -160,10 +160,10 @@
160- \t-S Enable the TCP MD5 signature option\n\ 160- \t-S Enable the TCP MD5 signature option\n\
161+ \t-r Randomize remote ports\n" 161+ \t-r Randomize remote ports\n"
162+#ifdef TCP_MD5SIG 162+#ifdef TCP_MD5SIG
163+ "\ 163+ "\
164+ \t-S Enable the TCP MD5 signature option\n" 164+ \t-S Enable the TCP MD5 signature option\n"
165+#endif 165+#endif
166+ "\ 166+ "\
167 \t-s source Local source address\n\ 167 \t-s source Local source address\n\
168 \t-T keyword TOS value or TLS options\n\ 168 \t-T keyword TOS value or TLS options\n\
169 \t-t Answer TELNET negotiation\n\ 169 \t-t Answer TELNET negotiation\n\
@@ -172,10 +172,10 @@
172- \t-V rtable Specify alternate routing table\n\ 172- \t-V rtable Specify alternate routing table\n\
173+ \t-u UDP mode\n" 173+ \t-u UDP mode\n"
174+#ifdef SO_RTABLE 174+#ifdef SO_RTABLE
175+ "\ 175+ "\
176+ \t-V rtable Specify alternate routing table\n" 176+ \t-V rtable Specify alternate routing table\n"
177+#endif 177+#endif
178+ "\ 178+ "\
179 \t-v Verbose\n\ 179 \t-v Verbose\n\
180 \t-w timeout Timeout for connects and final net reads\n\ 180 \t-w timeout Timeout for connects and final net reads\n\
181 \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\ 181 \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\