Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

Docs: the components' own scopes in TERMINAL, PACKAGES, PRINTING and MAIL

Federico Pereira97192f53966a
diff --git a/docs/MAIL.md b/docs/MAIL.md
index ba47f6c..da8b360 100644
--- a/docs/MAIL.md
+++ b/docs/MAIL.md
@@ -57,7 +57,10 @@ run in one sandboxed helper process, **`lord-maild`**.
- **No socket of its own.** `lord-maild` cannot create sockets. To reach a server it sends
`MR_CONNECT {host, port}`; `lord-server` (`mailc.c`) checks the endpoint against the accounts
file and, if allowed, resolves it, connects (10 s timeout) on a thread of its own and passes the
- connected socket back (`MQ_SOCK`). The allowed endpoints are exactly: each account's IMAP and
+ connected socket back (`MQ_SOCK`). (0.8.4) The socket itself is made and connected by Mail's connector
+ (`lord-server --net-connector mail`, in `lordos-net-mail.scope`), so Mail and the calendar sync
+ are their own app for the firewall and Monitor → Network ("Mail and calendars", `lordos:mail`;
+ `FIREWALL.md`, "LordOS components in their own scopes"); the endpoint check above is unchanged. The allowed endpoints are exactly: each account's IMAP and
SMTP `host:port`, each DAV URL's `host:port`, and — for CalDAV/CardDAV discovery redirects inside
the same provider (for example `pNN-caldav.icloud.com`) — other hosts of the same domain on port 443.
So a malicious message that takes over `lord-maild` still cannot talk to anything else.
diff --git a/docs/PACKAGES.md b/docs/PACKAGES.md
index 56e808d..81782af 100644
--- a/docs/PACKAGES.md
+++ b/docs/PACKAGES.md
@@ -44,6 +44,11 @@ The code is in `server/src/pkg/`:
- **Local repositories.** A `file:/path` source (a repository on a disk or a USB stick, like apt's
`file:` method) is read by the same unprivileged child, as `nobody`: only world-readable files,
checked exactly like a download. An HTTP redirect can never lead to a `file:` URL.
+- **Its own firewall app** (0.8.4): before dropping root the download child moves itself into
+ `lordos-net-store.scope` (`cgroup_enter_root`), so the Store and the updates are "Store and
+ updates" (`lordos:store`) in Monitor → Network, with their own rules; blocking them asks first,
+ because no security update arrives while they are blocked (`FIREWALL.md`, "LordOS components in
+ their own scopes").
- **Downloads without root.** The process that talks to the network drops privileges before
connecting: it becomes `nobody`, with no groups, with `no_new_privs` and no way back to root.
It passes the bytes to the root process through a pipe. The root process only writes them into
diff --git a/docs/PRINTING.md b/docs/PRINTING.md
index 3fda553..0475c44 100644
--- a/docs/PRINTING.md
+++ b/docs/PRINTING.md
@@ -100,6 +100,12 @@ CUPS (/run/cups/cups.sock) → Debian filters and drivers → the printer
lengths and no control characters. There are tests in `ipp-test`: a hand-built packet, truncated
at every byte and with a pointer loop.
+**Their own firewall app** (0.8.4): the IPP and eSCL connections to network printers and scanners,
+and the mDNS discovery socket, are made by the printers' connector (`lord-server --net-connector
+print`, `lordos-net-print.scope`), so they are "Printers and scanners" (`lordos:print`) in Monitor →
+Network, with their own rules (`FIREWALL.md`, "LordOS components in their own scopes"). The local
+CUPS socket is a Unix socket and isn't affected.
+
### Scanner (eSCL, `apps/scanner`)
`server/src/print/escl.c` + the **Scanner** app (opened from Settings or from the app launcher):
diff --git a/docs/TERMINAL.md b/docs/TERMINAL.md
index 9188553..18756bb 100644
--- a/docs/TERMINAL.md
+++ b/docs/TERMINAL.md
@@ -282,6 +282,10 @@ RemoteHost (user@host, for automatic profile switching) and define
line without newlines: it's the same thing the user could type into that tmux.
- `lord.fs.read()` (for the importer) reads regular files under `$HOME`, 8 MB maximum.
- Fonts are only looked up in font folders; those in `~/.fonts` belong to the user.
+- (0.8.4) The shell enters `lordos-net-terminal.scope` before exec (`pty.c`), so it and every
+ program it starts are the firewall app "Terminal" (`lordos:terminal`): its own row in Monitor →
+ Network, with each program's name, and its own rules (`FIREWALL.md`, "LordOS components in their
+ own scopes"). Best effort: a terminal that can't be placed still opens.
## Tests