<feed xmlns='http://www.w3.org/2005/Atom'>
<title>procd/state-file.h, branch master</title>
<subtitle>OpenWrt service / process manager</subtitle>
<id>https://git.openwrt.org/project/procd/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/procd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/'/>
<updated>2026-10-18T11:25:50Z</updated>
<entry>
<title>uxc: take provision entries from settings</title>
<updated>2026-10-18T11:25:50Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-15T07:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=5d7dc1095c4cf894b85391bd2111e0de282a0dbd'/>
<id>urn:sha1:5d7dc1095c4cf894b85391bd2111e0de282a0dbd</id>
<content type='text'>
Files can be bound into a container only through the provision list of
its registration, which the package or the stack writes, so an
operator cannot hand a container a configuration file or a key of its
own.

Add a provision key to the settings file and uxc set --provision
&lt;file&gt;:&lt;dst&gt;[:secret]. uxc copies the file into the provision
directory next to the registration, /etc/uxc/provision/&lt;name&gt;/ for a
container registered there and /tmp/run/uvol/.meta/provision/&lt;name&gt;/
for one on the uvol metadata volume, the handover directory between
uxc and ujail, under a name derived from the destination, and the
entry names that copy as its source, so no host path from outside ever
reaches ujail. The copy is staged before the settings are written and
moved into place once they are, and it is dropped if they are not.
Destinations must be normalised absolute paths, and the registration
stays authoritative: a destination it provisions, or /etc/hosts when
it sets a hosts file, is refused with EEXIST, and an entry shadowed by
a later registration is skipped at create and marked in uxc state.
Unsetting an entry removes its copy, and uxc delete and uxc reconcile
remove the directory of an unregistered container.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>jail, uxc: share the atomic file writer</title>
<updated>2026-10-18T10:25:00Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-10-08T21:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=97acb313cb63c14d196bd30e76cde3ffe0150171'/>
<id>urn:sha1:97acb313cb63c14d196bd30e76cde3ffe0150171</id>
<content type='text'>
jail_write_exit_status() writes the payload status to a fixed
exit_status.tmp sibling of the pid file and renames it into place,
and the uxc settings store is about to need the same write-then-rename
sequence for files of its own. A fixed temporary name lets two writers
of one path truncate each other's work, and a second copy of the
sequence in uxc.c would drift from the first.

Add state-file.h with file_write_atomic(), which creates a unique
temporary file beside the target with mkstemp(), applies the requested
mode with fchmod(), writes the whole buffer, closes it and renames it
over the target, unlinking the temporary file and returning -errno on
any failure. jail_write_exit_status() keeps its path and status
formatting and hands the write to the helper; uxc.c includes the
header for the settings writers that follow.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
