update netcat patch
This commit is contained in:
parent
9be9055791
commit
c31b03c1d4
@ -1,5 +1,5 @@
|
||||
--- apps/nc/netcat.c.orig 2015-10-14 15:39:27.000000000 +0900
|
||||
+++ apps/nc/netcat.c 2015-10-14 15:42:35.000000000 +0900
|
||||
--- apps/nc/netcat.c.orig 2015-10-23 16:01:14.000000000 -0700
|
||||
+++ apps/nc/netcat.c 2015-10-23 16:17:08.000000000 -0700
|
||||
@@ -57,6 +57,10 @@
|
||||
#include <tls.h>
|
||||
#include "atomicio.h"
|
||||
@ -61,7 +61,26 @@
|
||||
case 'T':
|
||||
errstr = NULL;
|
||||
errno = 0;
|
||||
@@ -771,7 +783,10 @@
|
||||
@@ -310,14 +322,16 @@
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
+#ifdef SO_RTABLE
|
||||
if (rtableid >= 0) {
|
||||
/*
|
||||
* XXX No pledge if doing rtable manipulation!
|
||||
* XXX the routing table stuff is dangerous and can't be pledged.
|
||||
* XXX rtable should really have a better interface than sockopt
|
||||
*/
|
||||
- }
|
||||
- else if (family == AF_UNIX) {
|
||||
+ } else
|
||||
+#endif
|
||||
+ if (family == AF_UNIX) {
|
||||
if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
}
|
||||
@@ -797,7 +811,10 @@
|
||||
remote_connect(const char *host, const char *port, struct addrinfo hints)
|
||||
{
|
||||
struct addrinfo *res, *res0;
|
||||
@ -73,7 +92,7 @@
|
||||
|
||||
if ((error = getaddrinfo(host, port, &hints, &res)))
|
||||
errx(1, "getaddrinfo: %s", gai_strerror(error));
|
||||
@@ -782,16 +797,20 @@
|
||||
@@ -808,16 +825,20 @@
|
||||
SOCK_NONBLOCK, res0->ai_protocol)) < 0)
|
||||
continue;
|
||||
|
||||
@ -94,7 +113,7 @@
|
||||
memset(&ahints, 0, sizeof(struct addrinfo));
|
||||
ahints.ai_family = res0->ai_family;
|
||||
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
|
||||
@@ -860,7 +879,10 @@
|
||||
@@ -886,7 +907,10 @@
|
||||
local_listen(char *host, char *port, struct addrinfo hints)
|
||||
{
|
||||
struct addrinfo *res, *res0;
|
||||
@ -106,7 +125,7 @@
|
||||
int error;
|
||||
|
||||
/* Allow nodename to be null. */
|
||||
@@ -882,13 +904,17 @@
|
||||
@@ -908,13 +932,17 @@
|
||||
res0->ai_protocol)) < 0)
|
||||
continue;
|
||||
|
||||
@ -124,7 +143,7 @@
|
||||
|
||||
set_common_sockopts(s, res0->ai_family);
|
||||
|
||||
@@ -1332,11 +1358,13 @@
|
||||
@@ -1358,11 +1386,13 @@
|
||||
{
|
||||
int x = 1;
|
||||
|
||||
@ -138,7 +157,7 @@
|
||||
if (Dflag) {
|
||||
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
|
||||
&x, sizeof(x)) == -1)
|
||||
@@ -1511,15 +1539,19 @@
|
||||
@@ -1537,15 +1567,19 @@
|
||||
\t-P proxyuser\tUsername for proxy authentication\n\
|
||||
\t-p port\t Specify local port for remote connects\n\
|
||||
\t-R CAfile CA bundle\n\
|
||||
|
Loading…
x
Reference in New Issue
Block a user