Expand description
Daemon capability survey.
Probes the runtime environment of the zlayer daemon (root vs. non-root,
host vs. nested in a container, cgroup v2 path, CAP_NET_ADMIN, presence
of /dev/net/tun, and writability of the cgroup root) and derives a coarse
DaemonMode from those signals.
All probes are intentionally cheap and non-destructive — a handful of syscalls, no allocations of kernel resources (no TUN interfaces, no cgroup writes). The struct is safe to construct multiple times.
Non-Linux targets report a fixed degraded survey since the kernel features these probes target are Linux-only.
Structs§
- Daemon
Capabilities - Snapshot of the daemon’s effective capabilities and execution environment.
Enums§
- Daemon
Mode - Coarse classification of the daemon’s effective execution environment.
Functions§
- current_
cgroup_ v2_ path - Returns the current process’s cgroup-v2 path, if any.
- ensure_
daemon_ leaf_ and_ container_ parent - Migrate the current daemon process into a
<scope>/initsub-cgroup and return the sibling<scope>/containerspath as the parent for future container cgroups. Idempotent — safe to call multiple times.