malcontent: pass the useradd options to every system user

USERADD_PARAM is a semicolon separated list of complete useradd
invocations. Only the first entry carried the options, so
malcontent-timerd and malcontent-webd were created with the useradd
defaults: regular UIDs from the user range, /bin/sh as shell and
/home/malcontent-timerd and /home/malcontent-webd created in the
rootfs. Upstream declares all three as system users without a home in
its sysusers.d fragments.

Repeat the options for each user and point the home of the two daemons
at the StateDirectory their units use, so no directory shows up under
/home.

Tested on corei7-64: the rootfs of plasma-image contains only the real
user under /home and all three accounts have system UIDs, /bin/false
and no home directory.

AI-Generated: Uses Claude Code (Claude Fable 5.1)
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Markus Volk authored and Khem Raj committed 2026-09-11 07:07:57 -07:00
1 parent 7a196ffed9
commit 745132082c
1 file changed
+5 -1
@@ -37,5 +37,9 @@ FILES:${PN} += " \
"
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --no-create-home --user-group --shell /bin/false --home-dir ${localstatedir} malcontent-timer-ext-agent;malcontent-timerd;malcontent-webd"
USERADD_PARAM:${PN} = " \
--system --no-create-home --user-group --shell /bin/false --home-dir ${localstatedir} malcontent-timer-ext-agent; \
--system --no-create-home --user-group --shell /bin/false --home-dir ${localstatedir}/lib/malcontent-timerd malcontent-timerd; \
--system --no-create-home --user-group --shell /bin/false --home-dir ${localstatedir}/lib/malcontent-webd malcontent-webd \
"