diff --git a/PLAN.md b/PLAN.md index 422d62c..e1b6c9e 100644 --- a/PLAN.md +++ b/PLAN.md @@ -37,31 +37,33 @@ repo only has `build-aux/arch/`. ## Keep in step with CoreDesktop -Last compared with CoreDesktop at `4a4a3bd` (2026-11-11), when the port was -made. Port what applies to Pop!_OS, then move this marker to the CoreDesktop -commit compared with. To see what's new: +Last compared with CoreDesktop at `4e9b962` (2026-11-28). Port what applies to +Pop!_OS, then move this marker to the CoreDesktop commit compared with. To see +what's new: ``` git -C ../coredesktop log --oneline ..HEAD -- configure configure.d sandbox system ``` -Since `4a4a3bd`, to look at: +Nothing to port since `4e9b962`. -- [ ] `05b13b2` Test the agent sandbox from inside: port - `smoketest/scenarios/60-security.sh`, which runs a script through - sandbox/bin's wrappers and checks what it can't read, write or reach, - and its later checks from `d5925fa` (what root runs is root's alone) and - `53c6c8b` (the install path). Hiding the connector's settings from - agents is done. -- [ ] `ffbaf71` Keep other machines on the network from reaching Docker - containers: only if the connector ever installs Docker +Not ported, and why: -Arch or GNOME only, nothing to port: from `9dc5eb1`, the pacman guard, unowned -files and `hardware.sh` (System76 does its own); `e14a345` and `ba4dc17` -(login screen logo), `1e2581d` (kernel modules), `d456e31` (initramfs), -`5d7db2c` (reboot after update: Pop!_OS' own updates handle this). +- `ffbaf71` Keep other machines on the network from reaching Docker + containers: only if the connector ever installs Docker +- From `9dc5eb1`: the pacman guard, unowned files and `hardware.sh` (System76 + does its own), and "Send with Tailscale" (COSMIC Files has no Scripts menu) +- From `05b13b2`'s security checks: network exposure (ufw, Docker, sshd), which + the connector doesn't install +- Arch or GNOME only: `e14a345` and `ba4dc17` (login screen logo), `1e2581d` + (kernel modules), `d456e31` (initramfs), `5d7db2c` (reboot after update: + Pop!_OS' own updates handle this) ## Pop!_OS-specific +- [ ] `make lint` and `smoketest/run --tier all` haven't run since the ports + from CoreDesktop at `4e9b962`: they were written on a machine without + shellcheck or Docker. The new scenarios' quick checks were run by hand; + `50-sandbox` and `80-security` (srt, PAM) never have been. - [ ] The manual checks in [TEST.md](TEST.md) on a real Pop!_OS 24.04 machine, against a real Core. None have been done yet. diff --git a/sandbox/agent b/sandbox/agent index 03431d7..a486947 100755 --- a/sandbox/agent +++ b/sandbox/agent @@ -104,8 +104,19 @@ reduce .[] as $config ({}; merge(.; $config))' # systemd, reaches it and it passes it on to the agent. That leaves nothing to # remove the settings file afterwards, so it's named after this process, and # files whose process has ended are removed here. -SETTINGS_DIR="${XDG_RUNTIME_DIR:-/tmp}/federated-sandbox" +# +# The folder is in your runtime folder, /run/user/, which no sandbox can +# write, never in /tmp, which every sandbox can: an agent could put its own +# settings, or a link, where the next one's go. XDG_RUNTIME_DIR names it, and +# systemd makes it at login, also for services and SSH. +runtime="/run/user/$(id -u)" +if [ ! -d "$runtime" ] || [ ! -O "$runtime" ]; then + echo "There's no runtime folder ($runtime) for the sandbox's settings; it's made when you log in." + exit 1 +fi +SETTINGS_DIR="$runtime/federated-sandbox" mkdir -p -m 700 "$SETTINGS_DIR" || exit 1 +[ -O "$SETTINGS_DIR" ] && [ ! -L "$SETTINGS_DIR" ] || { echo "$SETTINGS_DIR isn't yours alone."; exit 1; } for old in "$SETTINGS_DIR"/*.json; do pid="${old%.json}" pid="${pid##*.}" diff --git a/smoketest/README.md b/smoketest/README.md index eae3737..58808e2 100644 --- a/smoketest/README.md +++ b/smoketest/README.md @@ -1,6 +1,6 @@ # Smoketest -These tests run `configure`'s pieces on Ubuntu 24.04, which Pop!_OS 24.04 is built on, in throwaway Docker containers. A container has the same apt packages as Pop!_OS, except COSMIC's own, and `/etc/os-release` says Pop!_OS. Each scenario starts a session D-Bus and an unlocked gnome-keyring, as COSMIC does at login. +These tests run `configure`'s pieces on Ubuntu 24.04, which Pop!_OS 24.04 is built on, in throwaway Docker containers. A container has the same apt packages as Pop!_OS, except COSMIC's own, and `/etc/os-release` says Pop!_OS. Each scenario starts with what a login gives: `USER`, `/run/user/`, a session D-Bus in it and an unlocked gnome-keyring, as on Pop!_OS. They check what lint can't: @@ -39,6 +39,7 @@ Each run writes its logs to `smoketest/results/