;;; Copyright (c) 2024 Apple Inc.  All Rights reserved.
;;;
;;; WARNING: The sandbox rules in this file currently constitute
;;; Apple System Private Interface and are subject to change at any time and
;;; without notice.
;;;
(version 1)

(deny default)
(deny file-map-executable process-info* nvram*)
(deny dynamic-code-generation)

(import "system.sb")
(import "com.apple.corefoundation.sb")
(corefoundation)

(allow mach-lookup
    (global-name "com.apple.duetactivityscheduler"
                 "com.apple.TapToRadarKit.service")
)

(allow process-info* (target self))

(allow file-read-metadata)

(allow process-info-codesignature)

(allow user-preference-read
        (preference-domain "kCFPreferencesAnyApplication"))

(allow user-preference-read user-preference-write
       (preference-domain "spinandd"))

(allow file-read* file-write*
       (subpath (param "TMPDIR")))
       
(allow file-read*
    (literal "/usr/local/libexec")
    (literal "/usr/local/libexec/spinandd")
)
