From d41fef5b74478b36787f387ed3f58099ac19c905 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 30 Aug 2022 10:56:03 +0000 Subject: s6-tls[cd]: don't leak useless fd to the app Signed-off-by: Laurent Bercot --- AUTHORS | 1 + src/tls/s6tls_sync_and_exec_app.c | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index fa18529..5c0f4f3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,3 +15,4 @@ Thanks to: Paul Jarc Colin Booth Amitai Schleier + Petr Vaněk diff --git a/src/tls/s6tls_sync_and_exec_app.c b/src/tls/s6tls_sync_and_exec_app.c index 5c0180c..4126ad6 100644 --- a/src/tls/s6tls_sync_and_exec_app.c +++ b/src/tls/s6tls_sync_and_exec_app.c @@ -28,5 +28,6 @@ void s6tls_sync_and_exec_app (char const *const *argv, int const p[4][2], pid_t _exit(wait_estatus(wstat)) ; } if (r >= MAXENVSIZE) strerr_dief1x(101, "SSL data too large; recompile with a bigger MAXENVSIZE") ; + close(p[2][0]) ; s6tls_clean_and_exec(argv, options, buf, r-1) ; } -- cgit v1.2.3