Privilege split 7/11: launch the LLM servers as plain child processes
- kurgan/ai/launcher.py: the app is unelevated now, so the servers are started with CreateProcessW, still suspended into their own kill-on-close job object and with an explicit handle list (only the log and NUL are inherited). Gone: the copy of Explorer's token (CreateProcessWithTokenW), the Safer "normal user" token and CreateProcessAsUserW, and with them the AI service's wait for the desktop at logon. - launch() refuses (PermissionError) if The Kurgan itself is elevated, rather than pass admin rights on to a model server; this also covers opening the browser. - Tests: the handle list is checked for real (an inheritable, unlisted handle doesn't reach the child; a control run without the list leaks it), and an elevated app starts nothing. The launch tests skip when the suite itself runs elevated. - The UI's server token label and the README's launcher paragraph follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eb771656fb
commit
e583e25346
5 files changed
+76
-168
No files matched your search
@@ -763,7 +763,7 @@ function renderActive(ai) {
|
||||
const st = b.model.state;
|
||||
const adminLevel = b.token && ["high", "system"].includes(b.token.integrity);
|
||||
const token = !b.token ? null : adminLevel ? `admin rights, ${b.token.integrity} integrity (unexpected)`
|
||||
: `${b.token.elevated ? "restricted token" : "normal user"}, ${b.token.integrity} integrity`;
|
||||
: `normal user, ${b.token.integrity} integrity`;
|
||||
const kv = el("dl", { class: "kv" },
|
||||
el("dt", { text: "Model" }), el("dd", { text: b.model.id ?? b.model_label }),
|
||||
b.model.context ? [el("dt", { text: "Context" }), el("dd", { text: `${fmt.n0(b.model.context)} tokens` })] : null,
|
||||
|
||||
Reference in new issue
Block a user