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.
C cdebiandesktop-environmentebpffirewalllandlocklinuxlinux-distributionopen-sourceprivacyquickjsraspberry-pi-5reactsecuritywaylandwayland-compositor
Network tab fixes from the VM: the socket's app is cgApp (not the scope field), a dash for system rows, a shorter search placeholder; the connector no longer dies with the thread that started it
Federico Pereirac34a9ad0e151
diff --git a/apps/monitor/Network.jsx b/apps/monitor/Network.jsxindex 9b58c43..b8126ce 100644--- a/apps/monitor/Network.jsx+++ b/apps/monitor/Network.jsx@@ -28,9 +28,9 @@ import { TokenSearch, ViewButton, useNetView, TreeChildren, Child } from './NetTconst { COMPONENTS, isSystemId, filterFlows, groupFlows, sortTree } = netModel;-// (0.8.4) a socket made in an app's scope is that app's (conn.c "scope"), whoever holds it: the ones+// (0.8.4) a socket made in an app's scope is that app's (conn.c "cgApp"), whoever holds it: the ones// Mail's connector made are Mail's, a program in the Terminal is the Terminal's-export const appKeyOf = (c) => c.scope || (c.self ? 'lordos' : c.app || c.exe || c.name || '?');+export const appKeyOf = (c) => c.cgApp || (c.self ? 'lordos' : c.app || c.exe || c.name || '?');// The row's name: LordOS's own components by their label, LordOS itself, or the app's name.export const labelOf = (tr, g) => (COMPONENTS[g.key] ? tr(COMPONENTS[g.key].label) : g.key === 'lordos' ? tr('monitor.lordos') : g.name);const countryName = (cc) => (cc ? tOptional(`countries.${cc}`) || cc : '');@@ -87,11 +87,11 @@ function useGroups(conns) {let g = apps.get(key);if (!g) {const comp = !!COMPONENTS[key] || key === 'lordos';- g = { key, item: comp ? { app: key } : c, name: comp || (c.self && !c.scope) ? null : c.appName || c.name || '?', exe: c.exe, pids: new Set(), conns: [], hosts: new Map(),+ g = { key, item: comp ? { app: key } : c, name: comp || (c.self && !c.cgApp) ? null : c.appName || c.name || '?', exe: c.exe, pids: new Set(), conns: [], hosts: new Map(),sent: 0, recv: 0, rateTx: 0, rateRx: 0, listen: [], incoming: 0, verdict: 'allow', programs: new Set() };apps.set(key, g);}- if (c.name && c.scope && !c.self) g.programs.add(c.name);+ if (c.name && c.cgApp && !c.self) g.programs.add(c.name);if (!g.exe && c.exe) g.exe = c.exe;if (c.pid > 0) g.pids.add(c.pid);g.conns.push(c);@@ -194,6 +194,9 @@ function withFirewall(groups, fw, launcher) {// { app, out, any, allow|deny } (lord.fw); ir y volver no acumula reglas. Las apps sin scope propia// (un programa suelto, identificado por su ruta) no se pueden filtrar: el interruptor queda fijo.function RuleSwitch({ g, selected, onConfirm }) {+ const t = useTheme();+ // the essential system services and the VPN can't take a rule: a dash instead of a switch+ if (g.system) return <Text style={{ width: 26, fontSize: 11, color: selected ? '#fff' : t.textDim, textAlign: 'center' }}>—</Text>;const on = g.rule !== 'deny';const can = firewall.available() && firewall.enforceable(g.key);const color = on ? '#30d158' : '#ff453a';diff --git a/assets/locales/en/monitor.json b/assets/locales/en/monitor.jsonindex 10d692f..5f967b9 100644--- a/assets/locales/en/monitor.json+++ b/assets/locales/en/monitor.json@@ -297,7 +297,7 @@"net.remoteAdminOnly": "Only administrators see failed sign-ins and can block addresses.","net.remoteLists": "Address lists","net.remoteBlockedTotal": "Blocked in all",- "net.searchTokens": "Search: app:, domain:, ip:, port:, proto:, country:",+ "net.searchTokens": "Search, or app: port: domain:…","net.clearChips": "Clear","net.chip.app": "App","net.chip.domain": "Domain",diff --git a/assets/locales/es/monitor.json b/assets/locales/es/monitor.jsonindex 942d1a1..ce65fb1 100644--- a/assets/locales/es/monitor.json+++ b/assets/locales/es/monitor.json@@ -297,7 +297,7 @@"net.remoteAdminOnly": "Solo los administradores ven los ingresos fallidos y pueden bloquear direcciones.","net.remoteLists": "Listas de direcciones","net.remoteBlockedTotal": "Bloqueadas en total",- "net.searchTokens": "Buscar: app:, domain:, ip:, port:, proto:, country:",+ "net.searchTokens": "Buscar, o app: port: domain:…","net.clearChips": "Borrar","net.chip.app": "App","net.chip.domain": "Dominio",diff --git a/assets/locales/pt/monitor.json b/assets/locales/pt/monitor.jsonindex 36d0518..3c3c6ac 100644--- a/assets/locales/pt/monitor.json+++ b/assets/locales/pt/monitor.json@@ -297,7 +297,7 @@"net.remoteAdminOnly": "Só administradores veem as entradas com erro e podem bloquear endereços.","net.remoteLists": "Listas de endereços","net.remoteBlockedTotal": "Bloqueados no total",- "net.searchTokens": "Buscar: app:, domain:, ip:, port:, proto:, country:",+ "net.searchTokens": "Buscar, ou app: port: domain:…","net.clearChips": "Limpar","net.chip.app": "App","net.chip.domain": "Domínio",diff --git a/server/src/monitor/conn.c b/server/src/monitor/conn.cindex 0f54821..e4b6b0b 100644--- a/server/src/monitor/conn.c+++ b/server/src/monitor/conn.c@@ -9,7 +9,7 @@* (0.8.4) Each socket's cgroup comes too (INET_DIAG_CGROUP_ID): a socket made in one of the session's* scopes is that app's, whoever holds it now (lord-server holds the ones Mail's connector made, a* program in the Terminal is the Terminal's), so the list says "scope": the app's firewall id, the- * same lord-netperm counts it under.+ * same lord-netperm counts it under ("cgApp").** The country comes from the local database (mmdb.c). No address leaves the machine. */#include "monpriv.h"@@ -336,7 +336,7 @@ void conn_scan(Buf *b, const Mmdb *geo) {mon_buf_str(b, pi >= 0 ? pinfo[pi].name : "");mon_buf_printf(b, ",\"exe\":");mon_buf_str(b, pi >= 0 ? pinfo[pi].exe : "");- mon_buf_printf(b, ",\"scope\":");+ mon_buf_printf(b, ",\"cgApp\":");mon_buf_str(b, scope_app_of(s->cg));if (s->bytes) mon_buf_printf(b, ",\"sent\":%llu,\"recv\":%llu}", (unsigned long long)s->sent, (unsigned long long)s->recv);else mon_buf_printf(b, ",\"sent\":null,\"recv\":null}");diff --git a/server/src/sec/netconn.c b/server/src/sec/netconn.cindex 7942270..f7c414e 100644--- a/server/src/sec/netconn.c+++ b/server/src/sec/netconn.c@@ -192,8 +192,8 @@ int netconn_main(int argc, char **argv) {int known = 0;for (int i = 0; i < NC_COUNT; i++) known |= !strcmp(argv[2], NAMES[i]);if (!known) return 2;- prctl(PR_SET_PDEATHSIG, SIGKILL);- if (getppid() == 1) return 0;+ /* no PR_SET_PDEATHSIG: it fires when the *thread* that forked us ends (a worker thread of+ * lord-server), not lord-server; the channel closing (recv → 0) is what ends the connector */prctl(PR_SET_DUMPABLE, 0);prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);signal(SIGPIPE, SIG_IGN);