From 29100ede694ef8500f2f63211fff3232d3254516 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 19 Jun 2026 03:57:56 +0000 Subject: Make fdhuser a config variable and --fdholder-user a global option And remove the -h|--fdholder-user from various subcommands. --- NEWS | 4 ++++ configure | 15 +++++++++++---- doc/s6.conf.html | 6 ++++++ doc/s6_repository.html | 15 ++------------- doc/s6_set.html | 16 ++-------------- doc/upgrade.html | 1 - package/configure-snippets/configure_case_lines | 1 + package/configure-snippets/configure_generate_configh | 3 +++ package/configure-snippets/configure_generate_make | 1 + package/configure-snippets/configure_help_options | 1 + package/configure-snippets/configure_init_vars | 1 + src/s6-frontend/main.help.txt | 1 + src/s6-frontend/repository.help.txt | 4 +--- src/s6-frontend/repository_init.c | 17 +++-------------- src/s6-frontend/repository_sync.c | 17 +++-------------- src/s6-frontend/s6-frontend-internal.h | 2 ++ src/s6-frontend/s6-frontend.c | 6 +++++- src/s6-frontend/set.help.txt | 2 -- src/s6-frontend/set_apply.c | 6 ++---- src/s6-frontend/set_commit.c | 6 ++---- 20 files changed, 51 insertions(+), 74 deletions(-) diff --git a/NEWS b/NEWS index f025c54..ab53bf7 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ In 0.1.0.0 - Bugfixes. - Documentation updates. + - New option: s6 -u|--user, for user services. + - New commands: s6 live reset, s6 apply. + - New shortcuts: s6 enable,disable,start,stop,kill,apply. + - The fdholder user is now a configuration variable. In 0.0.1.2 diff --git a/configure b/configure index 1849435..ace7d40 100755 --- a/configure +++ b/configure @@ -30,7 +30,7 @@ Fine tuning of the installation directories: --repodir=DIR default s6-rc repository [s6-rc default: /var/lib/s6-rc/repository] --bootdb=LINK location of the bootable s6-rc compiled db [s6-rc default: /etc/s6-rc/compiled/current] --stmpdir=DIR secure location for temporary s6-frontend files [/run/s6-frontend] - --conffile=FILE default configuration file for s6 command [SYSCONFDIR/s6-frontend.conf] + --conffile=FILE default configuration file for s6 command [SYSCONFDIR/s6.conf] If no --prefix option is given, by default libdir (but not dynlibdir) will be /usr/lib, and includedir will be /usr/include. @@ -58,8 +58,9 @@ Optional features: --disable-s6li do not use s6-linux-init functionality [enabled] --enable-util-linux use util-linux functionality [disabled] - --with-store-list=LIST list of service stores [PREFIX/share/s6-frontend/s6-rc/sources:SYSCONFDIR/s6-frontend/s6-rc/sources] + --with-store-list=LIST list of service stores [PREFIX/share/s6/sources:SYSCONFDIR/s6/sources] --with-default-bundle=NAME name of the bundle started at boot [s6-rc default: default] + --with-fdholder-user=USER s6-fdholderd user to embed in databases [s6-svscan user] EOF exit 0 @@ -186,9 +187,10 @@ livedir= repodir= bootdb= stmpdir=/run/s6-frontend -conffile='$sysconfdir/s6-frontend.conf' -storelist='$prefix/share/s6-frontend/s6-rc/sources:$sysconfdir/s6-frontend/s6-rc/sources' +conffile='$sysconfdir/s6.conf' +storelist='$prefix/share/s6/sources:$sysconfdir/s6/sources' defbundle= +fdhuser= usensss=false uses6li=true @@ -240,6 +242,7 @@ for arg ; do --conffile=*) conffile=${arg#*=} ;; --with-store-list=*) storelist=${arg#*=} ;; --with-default-bundle=*) defbundle=${arg#*=} ;; + --with-fdholder-user=*) fdhuser=${arg#*=} ;; --enable-nsss|--enable-nsss=yes) usensss=true ;; --disable-nsss|--enable-nsss=no) usensss=false ;; --enable-s6li|--enable-s6li=yes) uses6li=true ;; @@ -562,6 +565,7 @@ echo "REPODIR := $repodir" echo "BOOTDB := $bootdb" echo "STMPDIR := $stmpdir" echo "STORELIST := $storelist" +echo "FDHUSER := $fdhuser" if $usensss ; then echo "LIBNSSS := -lnsss" @@ -675,6 +679,9 @@ echo "#define ${package_macro_name}_CONF \"$conffile\"" echo "#undef ${package_macro_name}_STORELIST" echo "#define ${package_macro_name}_STORELIST \"$storelist\"" + +echo "#undef ${package_macro_name}_FDHUSER" +echo "#define ${package_macro_name}_FDHUSER \"$fdhuser\"" echo echo "#endif" exec 1>&3 3>&- diff --git a/doc/s6.conf.html b/doc/s6.conf.html index 39b1e76..8120603 100644 --- a/doc/s6.conf.html +++ b/doc/s6.conf.html @@ -99,6 +99,12 @@ The default is /usr/share/s6/sources:/etc/s6/sources terse (only print fatal error messages), 1 is normal (print error messages and warnings), over 1 is increasingly verbose (print informational messages, up to tracing and debug messages at level 4-5). The default is 1. + +
fdhuser
+
The system user for the internal fd-holding process spawned by +s6-rc. It must be a user defined in /etc/passwd. +The default is root and that is fine, but distributions +may want to set it to an unprivileged user.
diff --git a/doc/s6_repository.html b/doc/s6_repository.html index d9cfcc9..bda22b2 100644 --- a/doc/s6_repository.html +++ b/doc/s6_repository.html @@ -59,7 +59,7 @@ and usage of the s6 repository command. It is not as detailed as this p

Interface

-     s6 repository init [ -f ] [ -U ] [ -h fdhuser ]
+     s6 repository init [ -f ] [ -U ]