diff options
| author | kinichiro <kinichiro.inoguchi@gmail.com> | 2017-07-07 00:46:48 +0900 |
|---|---|---|
| committer | kinichiro <kinichiro.inoguchi@gmail.com> | 2017-07-07 00:46:48 +0900 |
| commit | 1f7777169d9399fdb5b00e29d868abd2535f3a14 (patch) | |
| tree | 50489f0aead019219840a0e1cbdc8ac6857f6c30 | |
| parent | 728bda183018cbc9736f03d4f21d2b4a2585e83d (diff) | |
| download | portable-1f7777169d9399fdb5b00e29d868abd2535f3a14.tar.gz portable-1f7777169d9399fdb5b00e29d868abd2535f3a14.tar.bz2 portable-1f7777169d9399fdb5b00e29d868abd2535f3a14.zip | |
update netcat patch
| -rw-r--r-- | patches/netcat.c.patch | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 1088249..7160d4c 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | --- apps/nc/netcat.c.orig Sat Jun 3 19:34:23 2017 | 1 | --- apps/nc/netcat.c.orig 2017-07-07 00:10:09.009409624 +0900 |
| 2 | +++ apps/nc/netcat.c Sat Jun 3 19:51:37 2017 | 2 | +++ apps/nc/netcat.c 2017-07-07 00:30:32.380088772 +0900 |
| 3 | @@ -65,7 +65,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 |
| 6 | #define BUFSIZE 16384 | 6 | #define BUFSIZE 16384 |
| 7 | +#ifndef DEFAULT_CA_FILE | 7 | +#ifndef DEFAULT_CA_FILE |
| 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_ALL (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 | @@ -94,9 +96,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,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 | @@ -264,12 +270,14 @@ | 27 | @@ -265,12 +271,14 @@ main(int argc, char *argv[]) |
| 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 | @@ -316,9 +324,11 @@ | 42 | @@ -317,9 +325,11 @@ main(int argc, char *argv[]) |
| 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 | @@ -342,9 +352,11 @@ | 54 | @@ -343,9 +353,11 @@ main(int argc, char *argv[]) |
| 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 | @@ -889,7 +901,10 @@ | 66 | @@ -888,7 +900,10 @@ int |
| 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 | @@ -904,8 +919,10 @@ | 78 | @@ -903,8 +918,10 @@ remote_connect(const char *host, const c |
| 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 | @@ -976,7 +993,10 @@ | 89 | @@ -975,7 +992,10 @@ int |
| 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 | @@ -997,9 +1017,11 @@ | 101 | @@ -996,9 +1016,11 @@ local_listen(char *host, char *port, str |
| 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 | @@ -1455,11 +1477,13 @@ | 113 | @@ -1454,11 +1476,13 @@ set_common_sockopts(int s, int af) |
| 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 | @@ -1470,9 +1494,16 @@ | 127 | @@ -1469,9 +1493,16 @@ set_common_sockopts(int s, int af) |
| 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 | @@ -1496,13 +1527,17 @@ | 144 | @@ -1495,13 +1526,17 @@ set_common_sockopts(int s, int af) |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | if (minttl != -1) { | 147 | if (minttl != -1) { |
| @@ -160,7 +160,7 @@ | |||
| 160 | } | 160 | } |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | @@ -1710,14 +1745,22 @@ | 163 | @@ -1709,14 +1744,22 @@ help(void) |
| 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\ |
