Recycle the macOS VNC agent per connection so permission prompts work

This commit is contained in:
Viktor Liu
2026-08-07 15:59:45 +02:00
parent ed1fb4b309
commit e95365f8b1
9 changed files with 222 additions and 103 deletions
+5 -1
View File
@@ -897,7 +897,11 @@ func (s *Server) handleConnection(conn net.Conn) {
}
ok, agentViewOnly := s.verifyAgentToken(conn, connLog)
if !ok {
connLog.Info("VNC connection rejected: agent token check failed")
// Reported there already, at a level that tells a liveness probe apart
// from a bad token. The daemon dials the agent socket to wait for it to
// come up, so this fires on every spawn and is not a rejection worth
// putting in front of anyone.
connLog.Debug("VNC connection rejected: agent token check failed")
return
}
header, err := s.readConnectionHeader(conn)