hive-priv: write a configured stable exe path into unit drop-ins
HIVE_PRIV_EXE, set by the module to the /run/hive-rootfs-check link, is checked at start and used for the drop-in's ExecStartPre. Without it the running binary's path is used as before, and an unlinked one gets an error that names the cause.
This commit is contained in:
parent
cb7a9badf7
commit
ca51bb9d54
1 changed files with 172 additions and 41 deletions
|
|
@ -253,13 +253,15 @@ let
|
|||
{
|
||||
# Read back from the rendered unit and assertion list: a misspelt
|
||||
# variable or a dropped assertion fails here.
|
||||
name = "hive-priv carries the userns data owner, no agent list, and the owner assertion passes";
|
||||
name = "hive-priv carries the userns data owner, no agent list, the stable exe link its tmpfiles rule creates, and the owner assertion passes";
|
||||
ok =
|
||||
let
|
||||
e = allLocal.systemd.services.hive-priv.environment;
|
||||
in
|
||||
!(e ? HIVE_PRIV_USERNS_AGENTS)
|
||||
&& e.HIVE_PRIV_USERNS_DATA_OWNER == "60000"
|
||||
&& e.HIVE_PRIV_EXE == "/run/hive-rootfs-check"
|
||||
&& lib.any (r: lib.hasPrefix "L+ /run/hive-rootfs-check " r) allLocal.systemd.tmpfiles.rules
|
||||
&& lib.any (
|
||||
a: lib.hasInfix "hive-controller.userns.dataOwner" a.message && a.assertion
|
||||
) allLocal.assertions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue