bundles/left4me: drop l4d2-sandbox user; tighten /var/lib/left4me to 0755
Companion to the uid-collapse refactor on the left4me side (docs/superpowers/plans/2026-05-15-uid-collapse.md). The script- sandbox now runs as left4me too, defended by the hardening profile that landed earlier today rather than a kernel uid boundary. users + groups dicts: remove the l4d2-sandbox entry (uid/gid 981). /var/lib/left4me mode: 0711 → 0755. The 0711 was specifically a traverse-only loosening for the sandbox uid; with one user, the natural mode is back.
This commit is contained in:
parent
130b0b1c9c
commit
3ce1ee486e
2 changed files with 14 additions and 15 deletions
|
|
@ -36,9 +36,10 @@ from defaults. None of these need to be declared per-node.
|
||||||
|
|
||||||
## What this bundle does
|
## What this bundle does
|
||||||
|
|
||||||
- Creates system users `left4me` (uid/gid 980, home `/var/lib/left4me`,
|
- Creates system user `left4me` (uid/gid 980, home `/var/lib/left4me`,
|
||||||
mode 0711) and `l4d2-sandbox` (uid/gid 981, no home, used by bwrap
|
mode 0755) — same uid hosts the web app, gameservers, and the
|
||||||
script-overlay builds).
|
script-overlay sandbox unit (which drops privileges via systemd-run
|
||||||
|
with a fully hardened transient service).
|
||||||
- Drops privileged helpers under `/usr/local/libexec/left4me/`
|
- Drops privileged helpers under `/usr/local/libexec/left4me/`
|
||||||
(`left4me-systemctl`, `left4me-journalctl`, `left4me-overlay`,
|
(`left4me-systemctl`, `left4me-journalctl`, `left4me-overlay`,
|
||||||
`left4me-script-sandbox`) plus a tight sudoers file (validated with
|
`left4me-script-sandbox`) plus a tight sudoers file (validated with
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,13 @@ directories = {
|
||||||
'mode': '0755',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
'/var/lib/left4me': {
|
'/var/lib/left4me': {
|
||||||
# left4me's home dir — useradd creates with 0700; loosen to 0711 so
|
# left4me's home dir — useradd creates with 0700; loosen to 0755 so
|
||||||
# l4d2-sandbox can traverse (but not list) for bwrap bind-mounts.
|
# the systemd-imposed FS view for transient script-sandbox units
|
||||||
|
# (running as left4me with TemporaryFileSystem=/var/lib + selective
|
||||||
|
# binds) can traverse on its way to the overlay bind targets.
|
||||||
'owner': 'left4me',
|
'owner': 'left4me',
|
||||||
'group': 'left4me',
|
'group': 'left4me',
|
||||||
'mode': '0711',
|
'mode': '0755',
|
||||||
},
|
},
|
||||||
'/var/lib/left4me/installation': {'owner': 'left4me', 'group': 'left4me'},
|
'/var/lib/left4me/installation': {'owner': 'left4me', 'group': 'left4me'},
|
||||||
'/var/lib/left4me/overlays': {'owner': 'left4me', 'group': 'left4me'},
|
'/var/lib/left4me/overlays': {'owner': 'left4me', 'group': 'left4me'},
|
||||||
|
|
@ -40,8 +42,7 @@ directories = {
|
||||||
}
|
}
|
||||||
|
|
||||||
groups = {
|
groups = {
|
||||||
'left4me': {'gid': 980},
|
'left4me': {'gid': 980},
|
||||||
'l4d2-sandbox': {'gid': 981},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
|
@ -51,15 +52,12 @@ users = {
|
||||||
'home': '/var/lib/left4me',
|
'home': '/var/lib/left4me',
|
||||||
'shell': '/usr/sbin/nologin',
|
'shell': '/usr/sbin/nologin',
|
||||||
},
|
},
|
||||||
'l4d2-sandbox': {
|
|
||||||
'uid': 981,
|
|
||||||
'gid': 981,
|
|
||||||
'shell': '/usr/sbin/nologin',
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
# UIDs/GIDs pinned in the system-package range (100-999, per Debian
|
# UID/GID pinned in the system-package range (100-999, per Debian
|
||||||
# policy) so file ownership is deterministic across rebuilds and
|
# policy) so file ownership is deterministic across rebuilds and
|
||||||
# backup restores. 980/981 are unused elsewhere in this repo.
|
# backup restores. 980 is unused elsewhere in this repo.
|
||||||
|
# (981 — formerly l4d2-sandbox — was collapsed into 980 on 2026-05-15;
|
||||||
|
# see left4me/docs/superpowers/plans/2026-05-15-uid-collapse.md.)
|
||||||
|
|
||||||
# Privileged helpers are installed by the `install_left4me_scripts`
|
# Privileged helpers are installed by the `install_left4me_scripts`
|
||||||
# action (below) directly from the left4me git checkout at
|
# action (below) directly from the left4me git checkout at
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue