diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-06-05 11:35:50 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-06-05 11:35:50 +0000 |
commit | d3dfec19d30b50a0d6d185d07344d24d6819e061 (patch) | |
tree | 7d5dbb10b1a8f22cc6cf99a86d2d133621046182 | |
parent | 4447e7d6de2d027d21faf4da1695f4eaae2eedee (diff) | |
download | smtpd-starttls-proxy-d3dfec19d30b50a0d6d185d07344d24d6819e061.tar.gz smtpd-starttls-proxy-d3dfec19d30b50a0d6d185d07344d24d6819e061.tar.xz smtpd-starttls-proxy-d3dfec19d30b50a0d6d185d07344d24d6819e061.zip |
And with the right headers
-rw-r--r-- | src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c b/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c index d73a420..5eff7e6 100644 --- a/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c +++ b/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c @@ -5,12 +5,11 @@ #include <string.h> #include <strings.h> #include <stdlib.h> +#include <sys/uio.h> #include <skalibs/gccattributes.h> -#include <skalibs/posixplz.h> #include <skalibs/types.h> #include <skalibs/sgetopt.h> -#include <skalibs/allreadwrite.h> #include <skalibs/buffer.h> #include <skalibs/error.h> #include <skalibs/strerr2.h> @@ -230,8 +229,8 @@ static int process_client_line (char const *s) /* Engine */ -static int child (int, int) gccattr_noreturn ; -static int child (int fdr, int fdw) +static void child (int, int) gccattr_noreturn ; +static void child (int fdr, int fdw) { iopause_fd x[4] = { { .fd = 0 }, { .fd = 1 }, { .fd = fdr }, { .fd = fdw } } ; tain_t deadline ; @@ -323,7 +322,7 @@ static int child (int fdr, int fdw) if (wantexec >= 2) { int got = 0 ; - if (fd_write(fdctl, "Y", 1) < 0) + if (write(fdctl, "Y", 1) != 1) strerr_diefu1sys(111, "send ucspi-tls start command") ; fd_shutdown(fdctl, 1) ; for (;;) @@ -392,7 +391,7 @@ int main (int argc, char const *const *argv) case 0 : close(p[0][1]) ; close(p[1][0]) ; - return child(p[0][0], p[1][1]) ; + child(p[0][0], p[1][1]) ; default : break ; } |