aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2026-10-18 03:05:27 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2026-10-18 03:05:27 +0000
commiteeb89b66cde623c57c5551c795a97fab247e8881 (patch)
treed9bbfccfd95a55b26fd8d7f6fc53bf715609f963
parent3cf5ff95f97a81402c132caf4876a6eed17aab21 (diff)
downloads6-rc-eeb89b66cde623c57c5551c795a97fab247e8881.tar.gz
null and empty string are the same for catchall, fdhuser and defbundleHEADmain
-rw-r--r--src/s6-rc/s6-rc-compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index ec8f46a..7ed0c6f 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -1166,7 +1166,7 @@ static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, ch
EXECLINE_EXTBINPREFIX "redirfd -r 0 ./data/autofilled\n "
S6_EXTBINPREFIX "s6-ipcclient -l0 -- s\n "
S6RC_EXTLIBEXECPREFIX "s6-rc-fdholder-filler -1 ")) goto err ;
- if (catchall)
+ if (catchall && catchall[0])
{
if (!stralloc_cats(&satmp, "-L ")
|| !string_quote(&satmp, catchall, strlen(catchall))
@@ -1174,7 +1174,7 @@ static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, ch
}
if (!stralloc_cats(&satmp, "--\n }\n "
S6_EXTBINPREFIX "s6-svc -t .\n}\n")) goto err ;
- if (fdhuser)
+ if (fdhuser && fdhuser[0])
{
if (!stralloc_cats(&satmp, S6_EXTBINPREFIX "s6-envuidgid -i -- ")
|| !string_quote(&satmp, fdhuser, strlen(fdhuser))
@@ -1187,7 +1187,7 @@ static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, ch
fmt[len++] = ' ' ;
if (!stralloc_catb(&satmp, fmt, len)) goto err ;
}
- if (fdhuser)
+ if (fdhuser && fdhuser[0])
{
if (!stralloc_cats(&satmp, "-U ")) goto err ;
}