2
(deny default (with partial-symbolication))
3
(allow ipc-posix-shm system-audit system-socket file-read-metadata)
7
;; Utility functions for home directory relative path filters
8
(define (home-regex home-relative-regex)
9
(regex (string-append "^" (regex-quote (param "HOME_DIR")) home-relative-regex)))
11
(define (home-subpath home-relative-subpath)
12
(subpath (string-append (param "HOME_DIR") home-relative-subpath)))
14
(define (home-literal home-relative-literal)
15
(literal (string-append (param "HOME_DIR") home-relative-literal)))
17
;; Read-only preferences and data
20
(subpath "/Library/Frameworks")
21
(subpath "/private/var/db/mds")
23
;; System and user preferences
24
(literal "/Library/Preferences/.GlobalPreferences.plist")
25
(literal "/Library/Preferences/com.apple.Bluetooth.plist")
26
(literal "/Library/Preferences/com.apple.QuickTime.plist")
27
(regex #"^/Library/Preferences/com\.apple\.security")
28
(home-literal "/.CFUserTextEncoding")
29
(home-subpath "/Library/Audio")
30
(home-subpath "/Library/ColorPickers")
31
(home-subpath "/Library/ColorSync")
32
(home-subpath "/Library/Components")
33
(home-subpath "/Library/Input Methods")
34
(home-subpath "/Library/KeyBindings")
35
(home-subpath "/Library/Keyboard Layouts")
36
(home-subpath "/Library/Fonts")
37
(home-subpath "/Library/PDF Services")
38
(home-literal "/Library/Preferences/.GlobalPreferences.plist")
39
(home-regex #"/Library/Preferences/ByHost/\.GlobalPreferences\.")
40
(home-regex #"/Library/Preferences/ByHost/com\.apple\.Bluetooth\.")
41
(home-literal "/Library/Preferences/com.apple.ATS.plist")
42
(home-literal "/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse.plist")
43
(home-literal "/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist")
44
(home-literal "/Library/Preferences/com.apple.driver.AppleHIDMouse.plist")
45
(home-literal "/Library/Preferences/com.apple.inputmethodkit.plist")
46
(home-literal "/Library/Preferences/com.apple.iWork.Pages.plist")
47
(home-literal "/Library/Preferences/com.apple.LaunchServices.plist")
48
(home-literal "/Library/Preferences/com.apple.MultitouchSupport.plist")
49
(home-literal "/Library/Preferences/com.apple.opengl.plist")
50
(home-literal "/Library/Preferences/com.apple.security.plist")
51
(home-literal "/Library/Preferences/com.apple.security_common.plist")
52
(home-literal "/Library/Preferences/com.apple.speech.voice.prefs.plist")
53
(home-literal "/Library/Preferences/com.apple.speech.synthesis.general.prefs.plist")
54
(home-literal "/Library/Preferences/com.apple.systemsound.plist")
55
(home-literal "/Library/Preferences/com.apple.universalaccess.plist")
56
(home-literal "/Library/Preferences/com.apple.WebFoundation.plist")
57
(home-literal "/Library/Preferences/com.nvidia.OpenGL.plist")
58
(home-literal "/Library/Preferences/pbs.plist")
59
(home-literal "/Library/Preferences/com.apple.ServicesMenu.Services.plist")
60
(home-literal "/Library/Preferences/QuickTime Preferences")
62
(home-literal "/Library/Caches/com.apple.coreaudio.components.plist")
64
(subpath "/Library/Audio/Plug-Ins/Components")
65
(home-subpath "/Library/Audio/Plug-Ins/Components")
66
(subpath "/Library/Audio/Plug-Ins/HAL")
67
(subpath "/Library/QuickTime")
68
(home-subpath "/Library/QuickTime")
69
(subpath "/Library/Video/Plug-Ins")
71
(literal "/Library/Application Support/CrashReporter/SubmitDiagInfo.domains")
73
(home-literal "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain")
75
;; FIXME: This should be removed when <rdar://problem/10479685> is fixed.
76
(subpath "/Library/Keychains")
79
;; Read-write preferences and data
81
(home-regex #"/Library/Preferences/com\.apple\.WebKit\.PluginProcess\.plist")
83
(home-subpath "/Library/Caches/QuickTime")
85
;; FIXME: This should be removed when <rdar://problem/10479685> is fixed.
86
(home-subpath "/Library/Keychains"))
90
(iokit-connection "IOAccelerator")
91
(iokit-user-client-class "AGPMClient")
92
(iokit-user-client-class "AppleGraphicsControlClient")
93
(iokit-user-client-class "AppleSNBFBUserClient")
94
(iokit-user-client-class "IOAccelerationUserClient")
95
(iokit-user-client-class "IOAudioControlUserClient")
96
(iokit-user-client-class "IOAudioEngineUserClient")
97
(iokit-user-client-class "IOFramebufferSharedUserClient")
98
(iokit-user-client-class "IOHIDParamUserClient")
99
(iokit-user-client-class "IOSurfaceRootUserClient")
100
(iokit-user-client-class "IOSurfaceSendRight")
101
(iokit-user-client-class "RootDomainUserClient"))
103
;; Various services required by AppKit and other frameworks
105
(global-name "com.apple.CoreServices.coreservicesd")
106
(global-name "com.apple.DiskArbitration.diskarbitrationd")
107
(global-name "com.apple.FileCoordination")
108
(global-name "com.apple.FontObjectsServer")
109
(global-name "com.apple.FontServer")
110
(global-name "com.apple.ImageCaptureExtension2.presence")
111
(global-name "com.apple.SecurityServer")
112
(global-name "com.apple.SystemConfiguration.configd")
113
(global-name "com.apple.SystemConfiguration.PPPController")
114
(global-name "com.apple.SystemConfiguration.SCNetworkReachability")
115
(global-name "com.apple.audio.VDCAssistant")
116
(global-name "com.apple.audio.audiohald")
117
(global-name "com.apple.audio.coreaudiod")
118
(global-name "com.apple.cmio.VDCAssistant")
119
(global-name "com.apple.cookied") ;; FIXME: <rdar://problem/10790768> Limit access to cookies.
120
(global-name "com.apple.cvmsServ")
121
(global-name "com.apple.networkd")
122
(global-name "com.apple.ocspd")
123
(global-name "com.apple.pasteboard.1")
124
(global-name "com.apple.window_proxies")
125
(global-name "com.apple.windowserver.active")
126
(global-name "com.apple.cfnetwork.AuthBrokerAgent")
127
(global-name "com.apple.PowerManagement.control")
128
(global-name-regex #"_OpenStep$")
132
(allow system-socket (socket-domain AF_ROUTE))
133
(allow system-socket (require-all (socket-domain AF_SYSTEM) (socket-protocol 2))) ; SYSPROTO_CONTROL
134
(allow network-outbound
136
(control-name "com.apple.network.statistics")
137
(control-name "com.apple.netsrc")
139
;; Local mDNSResponder for DNS, arbitrary outbound TCP
140
(literal "/private/var/run/mDNSResponder")
144
(global-name "com.apple.tsm.uiserver")
145
(local-name "com.apple.tsm.portname")
148
;; Open and Save panels
149
(define (apply-read-and-issue-extension op path-filter)
150
(op file-read* path-filter)
151
(op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") path-filter)))
152
(define (apply-write-and-issue-extension op path-filter)
153
(op file-write* path-filter)
154
(op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") path-filter)))
155
(define (read-write-and-issue-extensions path-filter)
156
(apply-read-and-issue-extension allow path-filter)
157
(apply-write-and-issue-extension allow path-filter))
159
(extension "com.apple.app-sandbox.read-write"))
160
(read-write-and-issue-extensions (extension "com.apple.app-sandbox.read-write"))
163
(allow network-outbound (literal "/private/var/run/cupsd"))
165
(global-name "com.apple.printuitool.agent")
166
(global-name "com.apple.printtool.agent")
167
(global-name "com.apple.printtool.daemon"))
169
(home-literal "/.cups/lpoptions")
170
(home-literal "/.cups/client.conf")
171
(literal "/private/etc/cups/client.conf")
172
(literal "/private/etc/cups/lpoptions")
173
(subpath "/private/etc/cups/ppd")
174
(subpath "/private/var/run/cupsd")
175
(home-literal "/Library/Preferences/org.cups.PrintingPrefs.plist"))
177
;; Text Services Manager
178
(allow iokit-set-properties (iokit-property "CapsLockDelayOverride"))
180
;; Image Capture (used by print preview dialog)
181
(allow appleevent-send (appleevent-destination "com.apple.imagecaptureextension2"))
183
;; Silently block access to some files
184
(deny file-read* file-write* (with no-log)
185
(home-regex #"/Library/Preferences/com\.apple\.internetconfigpriv\.plist")
186
(home-regex #"/Library/Preferences/com\.apple\.internetconfig\.plist")
188
;; FIXME: Should be removed after <rdar://problem/9422957> is fixed.
189
(home-literal "/Library/Caches/Cache.db")
191
;; FIXME: Should be removed after <rdar://problem/10463881> is fixed.
192
(home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2")
193
(home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2-journal"))