1 ;;; Copyright (c) 2017 Apple Inc. All Rights reserved.
3 ;;; WARNING: The sandbox rules in this file currently constitute
4 ;;; Apple System Private Interface and are subject to change at any time and
10 (deny file-map-executable process-info* nvram*)
11 (deny dynamic-code-generation)
12 (deny mach-priv-host-port)
15 (import "com.apple.corefoundation.sb")
18 ;; We inspect all the binaries,
19 ;; resolve symlinks, realpath(3), and equivalents,
20 ;; read preference files in-process
24 (subpath "/private/var/db/mds"))
25 (allow file-ioctl (literal "/dev/auditsessions"))
27 (allow process-info* (target self))
28 (allow process-info-codesignature)
29 (allow process-info-pidinfo)
31 (when (string=? (param "LEGACY_TOKENS_ENABLED") "YES")
32 (allow process-exec (with no-sandbox) (subpath "/Library/Security/tokend"))
34 (allow signal (target children))
35 (allow file-write* (subpath "/private/var/db/TokenCache")))
37 (allow user-preference-read
38 (preference-domain "com.apple.security")
39 (preference-domain "com.apple.security.smartcard")
40 (preference-domain "kCFPreferencesAnyApplication")
41 (preference-domain "securityd"))
45 (global-name "com.apple.SecurityServer")
46 (global-name "com.apple.CoreServices.coreservicesd")
47 (global-name "com.apple.system.opendirectoryd.api")
48 (global-name "com.apple.securitydservice")
49 (global-name "com.apple.ocspd")
50 (global-name "com.apple.PowerManagement.control")
51 (global-name "com.apple.security.syspolicy")
52 (global-name "com.apple.security.agent")
53 (global-name "com.apple.security.agent.login")
54 (global-name "com.apple.security.KeychainStasher"))
57 (ipc-posix-name "com.apple.AppleDatabaseChanged")
58 (ipc-posix-name "apple.cfprefs.daemonv1"))
60 (allow iokit-open (iokit-user-client-class "RootDomainUserClient"))
62 (allow network-outbound
63 (path "/private/var/run/systemkeychaincheck.socket"))
65 (with-filter (system-attribute apple-internal)
67 (nvram-variable "AMFITrustedKeys")))