From 26cd94b2a8f6da396058b6c5d6446e237ec9d78f Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 26 Nov 2020 09:47:02 +0000 Subject: Convert to new exec.h syntax --- src/tls/s6-tlsclient.c | 12 +++++++----- src/tls/s6-tlsserver.c | 7 +++++-- src/tls/s6tls_exec_tlscio.c | 5 ++--- src/tls/s6tls_exec_tlsdio.c | 5 ++--- src/tls/s6tls_sync_and_exec_app.c | 6 +++--- src/tls/s6tls_ucspi_exec_app.c | 6 ++---- 6 files changed, 21 insertions(+), 20 deletions(-) (limited to 'src/tls') diff --git a/src/tls/s6-tlsclient.c b/src/tls/s6-tlsclient.c index 267f457..06ef4da 100644 --- a/src/tls/s6-tlsclient.c +++ b/src/tls/s6-tlsclient.c @@ -1,12 +1,14 @@ /* ISC license. */ -#include #include +#include + #include #include #include -#include #include +#include + #include #define USAGE "s6-tlsclient [ options ] host port prog...\n" \ @@ -24,8 +26,8 @@ struct options_s unsigned int ximeout ; unsigned int yimeout ; unsigned int kimeout ; - uint16_t localport ; ip46full_t localip ; + uint16_t localport ; unsigned int verbosity : 2 ; unsigned int flag4 : 1 ; unsigned int flag6 : 1 ; @@ -62,7 +64,7 @@ struct options_s .doxy = 0 \ } -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { options_t o = OPTIONS_ZERO ; PROG = "s6-tlsclient" ; @@ -197,6 +199,6 @@ int main (int argc, char const *const *argv, char const *const *envp) newargv[m++] = "--" ; while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - xpathexec_run(newargv[0], newargv, envp) ; + xexec(newargv) ; } } diff --git a/src/tls/s6-tlsserver.c b/src/tls/s6-tlsserver.c index fb899eb..fe493ad 100644 --- a/src/tls/s6-tlsserver.c +++ b/src/tls/s6-tlsserver.c @@ -2,11 +2,14 @@ #include #include + #include #include #include #include + #include + #include #define USAGE "s6-tlsserver [ -e ] [ options ] ip port prog...\n" \ @@ -80,7 +83,7 @@ struct options_s .doapply = 0 \ } -int main (int argc, char const *const *argv, char const *const *envp) +int main (int argc, char const *const *argv) { options_t o = OPTIONS_ZERO ; PROG = "s6-tlsserver" ; @@ -250,6 +253,6 @@ int main (int argc, char const *const *argv, char const *const *envp) } while (*argv) newargv[m++] = *argv++ ; newargv[m++] = 0 ; - xpathexec_run(newargv[0], newargv, envp) ; + xexec(newargv) ; } } diff --git a/src/tls/s6tls_exec_tlscio.c b/src/tls/s6tls_exec_tlscio.c index ad00ecd..e4e84f9 100644 --- a/src/tls/s6tls_exec_tlscio.c +++ b/src/tls/s6tls_exec_tlscio.c @@ -1,8 +1,7 @@ /* ISC license. */ -#include #include -#include +#include #include #include "s6tls-internal.h" @@ -49,5 +48,5 @@ void s6tls_exec_tlscio (int const *fds, uint32_t options, unsigned int verbosity newargv[m++] = fmtw ; fmtw[uint_fmt(fmtw, fds[1])] = 0 ; newargv[m++] = 0 ; - xpathexec_run(newargv[0], newargv, (char const *const *)environ) ; + xexec(newargv) ; } diff --git a/src/tls/s6tls_exec_tlsdio.c b/src/tls/s6tls_exec_tlsdio.c index b00adb2..3007cf0 100644 --- a/src/tls/s6tls_exec_tlsdio.c +++ b/src/tls/s6tls_exec_tlsdio.c @@ -1,8 +1,7 @@ /* ISC license. */ -#include #include -#include +#include #include #include "s6tls-internal.h" @@ -45,5 +44,5 @@ void s6tls_exec_tlsdio (int const *fds, uint32_t options, unsigned int verbosity newargv[m++] = fmtw ; fmtw[uint_fmt(fmtw, fds[1])] = 0 ; newargv[m++] = 0 ; - xpathexec_run(newargv[0], newargv, (char const *const *)environ) ; + xexec(newargv) ; } diff --git a/src/tls/s6tls_sync_and_exec_app.c b/src/tls/s6tls_sync_and_exec_app.c index 4ae63fa..ff42d73 100644 --- a/src/tls/s6tls_sync_and_exec_app.c +++ b/src/tls/s6tls_sync_and_exec_app.c @@ -1,12 +1,12 @@ /* ISC license. */ #include +#include #include -#include #include -#include #include +#include #include "s6tls-internal.h" @@ -39,5 +39,5 @@ void s6tls_sync_and_exec_app (char const *const *argv, int const p[4][2], pid_t if (r >= MAXENVSIZE) strerr_dief1x(100, "SSL data too large") ; m += r - 1 ; - xpathexec_r(argv, (char const *const *)environ, env_len((char const *const *)environ), buf, m) ; + xmexec_m(argv, buf, m) ; } diff --git a/src/tls/s6tls_ucspi_exec_app.c b/src/tls/s6tls_ucspi_exec_app.c index f4b52ef..34c05e2 100644 --- a/src/tls/s6tls_ucspi_exec_app.c +++ b/src/tls/s6tls_ucspi_exec_app.c @@ -4,10 +4,8 @@ #include #include -#include #include -#include -#include +#include #include "s6tls-internal.h" @@ -32,5 +30,5 @@ void s6tls_ucspi_exec_app (char const *const *argv, int const p[4][2], uint32_t memcpy(modif + m, "SSLWRITEFD=", 11) ; m += 11 ; m += uint_fmt(modif + m, p[0][1]) ; modif[m++] = 0 ; - xpathexec_r(argv, (char const *const *)environ, env_len((char const* const *)environ), modif, m) ; + xmexec_m(argv, modif, m) ; } -- cgit v1.2.3