mirror of
https://github.com/acamarata/curtain.git
synced 2026-06-30 18:54:25 +00:00
Detection: netstat lives at /usr/sbin/netstat, not /usr/bin — the hardcoded wrong path silently killed the ESTABLISHED-TCP activator (root cause of the failed live test). Fixed and live-verified. Added peered-UDP activator (5900-5902) for High-Performance sessions, per-signal transition logging, unconditional error logging for dead probe helpers, and probe v2 with full CGSession dictionary diffing. 7 new parser tests (32 total). Fixes from a full audit + adversarial review: idle source setting honored (default now Remote session activity), cover scope reduced to a coherent two-mode model with legacy migration (per-display toggle was inverted in onlyMarked and dead in all), curtain test no longer schedules a teardown over a live session, specific-display password box placement gets a real picker, refuse-to-arm enforced, activation notification posts a real banner, menu password gate bypassed when the event tap is dead, shared single-decoder aerial player with stale-task guard and async playability check, password buffer zeroed on successful unlock and Esc, XPC interruption/invalidation handlers, modern Accessibility settings URL, launchPath modernized, codesign failures now abort release.sh, monotonic CFBundleVersion, install.sh temp cleanup, dead armDisarmHotkey setting removed. Refactor: Curtain.swift and PreferencesWindow.swift split into focused files (largest now 479 lines). Wiki, README, and contributing docs updated to match. Build clean at 0 warnings, 32/32 tests pass.
27 lines
1.4 KiB
Swift
27 lines
1.4 KiB
Swift
import Foundation
|
|
|
|
/// Purpose: Shared XPC contract between the Curtain app (client) and the privileged
|
|
/// CurtainHelper daemon (service). Both targets depend on CurtainShared so
|
|
/// the protocol and identifiers stay in exactly one place.
|
|
/// Inputs: None — this is a declaration unit, not a runtime component.
|
|
/// Outputs: The `CurtainDisconnectXPC` remote-object interface and the well-known
|
|
/// mach-service / daemon-plist names.
|
|
/// Constraints: The protocol is `@objc` because NSXPCInterface requires an
|
|
/// Objective-C-visible protocol. The single method is async-by-reply.
|
|
/// SPORT: MASTER-DISCONNECT
|
|
|
|
/// Remote object interface the helper vends and the app calls.
|
|
@objc public protocol CurtainDisconnectXPC {
|
|
/// Ask the privileged helper to end the active remote Screen Sharing session.
|
|
/// `reply(true)` if at least one connection process was matched and signalled.
|
|
func endScreenSharingSession(reply: @escaping (Bool) -> Void)
|
|
}
|
|
|
|
/// Well-known identifiers shared by the app and the helper. The mach service name
|
|
/// is what the daemon's `NSXPCListener` registers and what the client connects to;
|
|
/// the plist name is what `SMAppService.daemon(plistName:)` looks up under
|
|
/// `Contents/Library/LaunchDaemons/` of the app bundle.
|
|
public enum CurtainHelperInfo {
|
|
public static let machServiceName = "io.acamarata.curtain.helper"
|
|
public static let daemonPlistName = "io.acamarata.curtain.helper.plist"
|
|
}
|