Protect Chrome debugging from other local OS accounts

This commit is contained in:
Ian Gulliver
2026-10-20 23:32:07 -07:00
parent 73689f0f2d
commit 4f88f8a4f4
6 changed files with 358 additions and 79 deletions
+13
View File
@@ -49,6 +49,19 @@ struct Server {
runCheck()
RunLoop.main.run()
}
if CommandLine.arguments.dropFirst().first == "chrome-broker" {
Thread.detachNewThread {
do {
try serveChromeBroker()
exit(0)
} catch {
FileHandle.standardError.write(Data("Chrome helper: \(error)\n".utf8))
exit(1)
}
}
RunLoop.main.run()
return
}
Thread.detachNewThread {
let inFlight = DispatchGroup()
while let line = readLine() {