From adf53fc275a1ea5959f4b3e55b290026009e973c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 23 Apr 2024 20:29:26 +0000 Subject: Prepare for 2.7.0.3; fix s6-tcpserverd fd bug Signed-off-by: Laurent Bercot --- AUTHORS | 1 + INSTALL | 10 +++++----- NEWS | 6 ++++++ doc/index.html | 12 ++++++------ doc/upgrade.html | 17 +++++++++++++++++ package/info | 2 +- src/conn-tools/s6-tcpserverd.c | 13 ++++--------- 7 files changed, 40 insertions(+), 21 deletions(-) diff --git a/AUTHORS b/AUTHORS index cf75642..a6a46e6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,3 +18,4 @@ Thanks to: Petr Vaněk Alex Grabowski pjvm + Jan Pobříslo diff --git a/INSTALL b/INSTALL index 1416d93..a4e5094 100644 --- a/INSTALL +++ b/INSTALL @@ -6,14 +6,14 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.14.1.0 or later: https://skarnet.org/software/skalibs/ - - Optional (but recommended): execline version 2.9.4.0 or later: https://skarnet.org/software/execline/ - - s6 version 2.12.0.3 or later: https://skarnet.org/software/s6/ + - skalibs version 2.14.1.1 or later: https://skarnet.org/software/skalibs/ + - Optional (but recommended): execline version 2.9.5.1 or later: https://skarnet.org/software/execline/ + - s6 version 2.12.0.4 or later: https://skarnet.org/software/s6/ - s6-dns version 2.3.7.1 or later: https://skarnet.org/software/s6-dns/ - Depending on whether you build the SSL tools, bearssl version 0.6 or later: https://bearssl.org/ - or libressl version 3.8.2 or later: https://libressl.org/ - or openssl version 1.1.1w or later: https://openssl.org/ *in addition to* + or libressl version 3.9.1 or later: https://libressl.org/ + or openssl version 3.3.0 or later: https://openssl.org/ *in addition to* libretls version 3.8.1 or later: https://git.causal.agency/libretls/about/ This software will run on any operating system that implements diff --git a/NEWS b/NEWS index 97f601c..b9dbd5d 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ Changelog for s6-networking. +In 2.7.0.3 +---------- + + - Bugfixes. + + In 2.7.0.2 ---------- diff --git a/doc/index.html b/doc/index.html index 78fefc0..edf9d65 100644 --- a/doc/index.html +++ b/doc/index.html @@ -55,13 +55,13 @@ as extensions to the s6 ecosystem.
  • A POSIX-compliant system with a standard C development environment
  • GNU make, version 3.81 or later
  • skalibs version -2.14.1.0 or later. It's a build-time requirement. It's also a run-time +2.14.1.1 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library.
  • (Optional, but recommended) execline version -2.9.4.0 or later. It's a build-time and run-time requirement.
  • +2.9.5.1 or later. It's a build-time and run-time requirement.
  • s6 version -2.12.0.3 or later. It's a build-time and run-time requirement.
  • +2.12.0.4 or later. It's a build-time and run-time requirement.
  • s6-dns version 2.3.7.1 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the s6-dns @@ -70,9 +70,9 @@ libraries.
    • Either BearSSL version 0.6 or later.
    • -
    • Or LibreSSL version 3.8.2 +
    • Or LibreSSL version 3.9.1 or later.
    • -
    • Or OpenSSL version 1.1.1w +
    • Or OpenSSL version 3.3.0 or later and LibreTLS version 3.8.1 or later.
    • @@ -91,7 +91,7 @@ run-time requirement if you link against its shared version.
      • The current released version of s6-networking is -2.7.0.2.
      • +2.7.0.3.
      • Alternatively, you can checkout a copy of the s6-networking git repository: diff --git a/doc/upgrade.html b/doc/upgrade.html index 575e356..9fe78fe 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,23 @@

        What has changed in s6-networking

        +

        in 2.7.0.3

        + +
          +
        • skalibs +dependency bumped to 2.14.1.1
        • +
        • execline +dependency bumped to 2.9.5.1
        • +
        • s6 +dependency bumped to 2.12.0.4
        • +
        • LibreSSL +optional dependency bumped to 3.9.1
        • +
        • OpenSSL +optional dependency bumped to 3.3.0
        • +
        • LibreTLS +optional dependency bumped to 3.8.1
        • +
        +

        in 2.7.0.2

          diff --git a/package/info b/package/info index a3bea87..d5fc19f 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-networking -version=2.7.0.2 +version=2.7.0.3 category=net package_macro_name=S6_NETWORKING diff --git a/src/conn-tools/s6-tcpserverd.c b/src/conn-tools/s6-tcpserverd.c index e8c2c34..21946d9 100644 --- a/src/conn-tools/s6-tcpserverd.c +++ b/src/conn-tools/s6-tcpserverd.c @@ -263,8 +263,8 @@ static inline void new_connection (int s, char const *ip, uint16_t port, char co { cspawn_fileaction fa[2] = { - [0] = { .type = CSPAWN_FA_MOVE, .x = { .fd2 = { [0] = 0, [1] = s } } }, - [1] = { .type = CSPAWN_FA_COPY, .x = { .fd2 = { [0] = 1, [1] = 0 } } } + [0] = { .type = CSPAWN_FA_MOVE, .x = { .fd2 = { [0] = 1, [1] = s } } }, + [1] = { .type = CSPAWN_FA_COPY, .x = { .fd2 = { [0] = 0, [1] = 1 } } } } ; char const *newenvp[envlen + 7] ; env_mergen(newenvp, envlen + 7, envp, envlen, modifs, m, 6) ; @@ -322,12 +322,7 @@ int main (int argc, char const *const *argv) } if (coe(0) == -1 || ndelay_on(0) == -1) strerr_diefu1sys(111, "set socket flags") ; - if (flag1) - { - if (fcntl(1, F_GETFD) < 0) - strerr_dief1sys(100, "called with option -1 but stdout said") ; - } - else close(1) ; + if (!fd_ensure_open(1, 1)) strerr_diefu1sys(111, "sanitize stdout") ; if (!maxconn) maxconn = 1 ; if (maxconn > ABSOLUTE_MAXCONN) maxconn = ABSOLUTE_MAXCONN ; if (localmaxconn > maxconn) localmaxconn = maxconn ; @@ -402,8 +397,8 @@ int main (int argc, char const *const *argv) memcpy(fmtport, modifs + portpos, portlen) ; fmtport[portlen] = '\n' ; allwrite(1, fmtport, portlen + 1) ; - close(1) ; } + close(1) ; } while (cont) -- cgit v1.2.3