Repository navigation
hisn 0.2.1
Added
/dev/shm(session.shm, defaultfalse): optional tmpfs at/dev/shm
with configurable size (session.shm_size, MiB, default 64). Default off =
no/dev/shm(0.2 behavior)./tmpsize (session.tmp_size, MiB, default 1024, range 16..=65536):
replaces the hardcoded 1 GiB constant with a policy key.--ready-fd Nonhisn run: after the session is live, writes"ready\n"
to fd N and closes it. For programmatic readiness (Wakil).- Opaque exec ids: every exec gets
exec_id = "e-<n>"(monotonic, never
reused).signalacceptsexec_id(preferred) orpid(deprecated, kept
for 0.2 clients); a recycledpidis rejected withE_NOT_FOUND. - Frozen
--jsonschemas:hisn ls --jsonandhisn inspect --jsonemit
{"schema":"hisn-ls/v1",…}/{"schema":"hisn-inspect/v1",…}.cwd,
hostname,networkare included inls --json. hisn ls --prune: remove stale session directories (no live
supervisor). Stale = control socket refuses AND supervisor pid is gone or
has a different starttime. Removal is fd-relative (openat2with
NO_SYMLINKS|NO_XDEV|BENEATH), so a planted symlink is unlinked and never
followed and a planted bind mount is never entered; it is owner-checked and
confined to the one session directory.- Stale session cleanup on
hisn run --session-id X: if the dir is
stale, remove it and proceed; if live,E_EXISTSstands. - Stale session cleanup on
hisn kill --session X: if stale, remove the
dir and exit 0 with"session X was stale; removed". supervisor.pidfile in the session dir: written at start with the
supervisor pid and starttime for stale-detection.- R5 ancestry retry (OPEN-POINTS P16):
is_descendant_ofretries the
whole/proc/<pid>/statuswalk onENOENT/ESRCH/EINTR(3 attempts,
50 ms apart). The retry targets the sandbox init (a specific pid), not
"any pid 1".
Changed
- passwd/group stub verified to use the host username (
HostFacts.username
from$USER);id -uninside the sandbox prints the host username. - init argv scrub: after START, init overwrites its argv memory in place
with"hisn-init"so the session id, policy path, and session dir do not
appear in/proc/1/cmdlineinside the sandbox. Best-effort. - musl ioctl casts (OPEN-POINTS P22): ioctl request constants cast with
as _sox86_64/aarch64-unknown-linux-muslcompile. The musl target
has not been leak-tested (stdlib not installed in the build sandbox).
Known issues
- Pending from the external §14 review (OPEN-POINTS): align DESIGN §4.5 with §7
on root-tmpfs renames; stop a continuous stream of spawns from starving a
hard revoke.
The leak suite (L1-L24) passed on Ubuntu 22.04 and 24.04 x86_64 CI runners for this exact commit before these binaries were built; the aarch64 binary is built and started () but has not been leak-tested. Binaries are dynamically linked against glibc and built natively on Ubuntu 22.04 (glibc 2.35 or newer required). Verify with sha256sum -c SHA256SUMS. See README, "Verifying a build".