diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-08-04 00:11:42 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-09-27 10:29:07 +0000 |
commit | bb3bc00f304cb4f0611d45555d124221d365bdce (patch) | |
tree | 1f96878a551b23276542247f90cd195fc4754643 /main/busybox/ssl_client.c | |
parent | 4ecb921f61d14dab2ac6ed518325df376138aa9b (diff) | |
download | aports-bb3bc00f304cb4f0611d45555d124221d365bdce.tar.bz2 aports-bb3bc00f304cb4f0611d45555d124221d365bdce.tar.xz |
main/busybox: upgrade to 1.29.3
* Remove all patches already applied upstream
* 0001-ash-add-support-for-command_not_found_handle-hook-fu.patch
* 0001-cat-fix-cat-e-and-cat-v-erroneously-numbering-1st-li.patch
* 0001-wget-emit-a-message-that-certificate-verification-is.patch
* 0015-ash-introduce-a-config-option-to-search-current-dire.patch
* 0016-top-handle-much-larger-VSZ-values.patch
* 0017-ifupdown-do-not-fail-if-interface-disappears-during-.patch
* Rename config option for command_not_found hook
* upstream patch adding this hook slightly differs from our
downstream patch in this regard
* Rebase some patches manually:
* external_ssl_client.patch
* 0006-ping-make-ping-work-without-root-privileges.patch
* 0007-fbsplash-support-image-and-bar-alignment-and-positio.patch
* Add support for `-e` to our ssl_client
* See https://git.busybox.net/busybox/commit/?id=403f2999f94937ba3f37db6d093832f636815bb9
* Update the configuration file
* Regenerate all patches using `git format-patch --no-numbered --no-signature`
to reduce the diff for future upgrades.
Diffstat (limited to 'main/busybox/ssl_client.c')
-rw-r--r-- | main/busybox/ssl_client.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/main/busybox/ssl_client.c b/main/busybox/ssl_client.c index 8aa558e70f..df7b5f9bfb 100644 --- a/main/busybox/ssl_client.c +++ b/main/busybox/ssl_client.c @@ -80,7 +80,7 @@ int do_poll(struct pollfd *fds, int nfds) return r; } -static void copy_loop(struct tls *ctx, int sfd) +static void copy_loop(struct tls *ctx, int sfd, int eofexit) { struct pollfd fds[2] = { { .fd = STDIN_FILENO, .events = POLLIN }, @@ -89,8 +89,11 @@ static void copy_loop(struct tls *ctx, int sfd) while (1) { int r = do_poll(fds, 2); - if (fds[0].revents) + if (fds[0].revents) { copy_from_stdin_to_tls(ctx, &fds[0].fd); + if (eofexit && fds[0].fd == -1) + break; + } if (fds[1].revents && copy_from_tls_to_stdout(ctx)) break; @@ -98,7 +101,7 @@ static void copy_loop(struct tls *ctx, int sfd) } void usage(const char *prog, int ret) { - printf("usage: %s [-s FD] [-I] -n SNI\n", prog); + printf("usage: %s [-s FD] [-I] [-e] -n SNI\n", prog); exit(ret); } @@ -109,9 +112,13 @@ int main(int argc, char *argv[]) struct tls_config *tc; struct tls *ctx; int insecure = 0; + int localeofexit = 0; - while ((c = getopt(argc, argv, "hs:n:I")) != -1) { + while ((c = getopt(argc, argv, "ehs:n:I")) != -1) { switch (c) { + case 'e': + localeofexit = 1; + break; case 'h': usage(argv[0], 0); break; @@ -152,7 +159,7 @@ int main(int argc, char *argv[]) if (tls_handshake(ctx) == -1) errx(1, "%s: %s", sni, tls_error(ctx)); - copy_loop(ctx, sfd); + copy_loop(ctx, sfd, localeofexit); tls_close(ctx); return 0; } |