[iOS] Sandbox should allow mach lookups related to media capturing
[WebKit-https.git] / Source / WebKit / Resources / SandboxProfiles / ios / com.apple.WebKit.WebContent.sb
1 ; Copyright (C) 2010-2019 Apple Inc. All rights reserved.
2 ;
3 ; Redistribution and use in source and binary forms, with or without
4 ; modification, are permitted provided that the following conditions
5 ; are met:
6 ; 1. Redistributions of source code must retain the above copyright
7 ; notice, this list of conditions and the following disclaimer.
8 ; 2. Redistributions in binary form must reproduce the above copyright
9 ; notice, this list of conditions and the following disclaimer in the
10 ; documentation and/or other materials provided with the distribution.
11 ;
12 ; THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
13 ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
14 ; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 ; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
16 ; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17 ; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
18 ; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
19 ; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20 ; CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21 ; ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
22 ; THE POSSIBILITY OF SUCH DAMAGE.
23
24 (version 1)
25 (deny default (with partial-symbolication))
26 (allow system-audit file-read-metadata)
27
28 (import "common.sb")
29
30 (deny mach-lookup (xpc-service-name-prefix ""))
31
32 (deny lsopen)
33
34 ;;;
35 ;;; The following rules were originally contained in 'UIKit-apps.sb'. We are duplicating them here so we can
36 ;;; remove unneeded sandbox extensions.
37 ;;;
38
39 ;;; <rdar://problem/29959382> Allow UIKit apps access to com.apple.TextInput.preferences mach service
40 (allow mach-lookup
41     (global-name "com.apple.TextInput.preferences"))
42
43 (allow mach-lookup
44     (xpc-service-name "com.apple.siri.context.service"))
45
46 (allow mach-lookup
47     (global-name "com.apple.frontboard.systemappservices")                 ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
48     (global-name-regex #"^com\.apple\.uikit\.viewservice\..+"))
49
50 ;; Any app could use ubiquity.
51 (ubiquity-client)
52
53 ;; Any app can play audio & movies.
54 (play-audio)
55 (play-media)
56
57 ;; Access to media controls
58 (media-remote)
59
60 (url-translation)
61
62 ;; For <rdar://problem/20812377> All applications need to be able to access the com.apple.UIKit.KeyboardManagement running in backboardd
63 ;; renamed in <rdar://problem/20909914> Rename com.apple.UIKit.KeyboardManagement
64 (allow mach-lookup
65     (global-name "com.apple.UIKit.KeyboardManagement")
66     (global-name "com.apple.UIKit.KeyboardManagement.hosted"))
67
68 ;; TextInput framework
69 (allow mach-lookup
70     (global-name "com.apple.TextInput")
71     (global-name "com.apple.TextInput.emoji")
72     (global-name "com.apple.TextInput.image-cache-server")
73     (global-name "com.apple.TextInput.lexicon-server")
74     (global-name "com.apple.TextInput.rdt")
75     (global-name "com.apple.TextInput.shortcuts"))
76 (mobile-preferences-read "com.apple.da")
77
78 ;; Various Accessibility services.
79 (allow mach-lookup
80     (xpc-service-name "com.apple.accessibility.AccessibilityUIServer")) ; Needed for Zoom focus updates
81
82 ;; ZoomTouch
83 ;; <rdar://problem/11823957>
84 (allow mach-lookup
85     (global-name "com.apple.accessibility.AXBackBoardServer"))
86
87 ;; Speak Selection & VoiceOver
88 ;; <rdar://problem/12030530> AX: Sandbox violation with changing Language while VO is on
89 ;; and <rdar://problem/13071747>
90 (mobile-preferences-read
91     "com.apple.SpeakSelection" ; Needed for WebSpeech
92     "com.apple.VoiceOverTouch" ; Needed for non-US english language synthesis
93     "com.apple.voiceservices") ; Ditto
94
95 (allow mach-lookup
96     (global-name "com.apple.audio.AudioComponentPrefs")
97     (global-name "com.apple.audio.AudioComponentRegistrar")
98     (global-name "com.apple.audio.AudioQueueServer"))
99
100 (allow mach-register
101     (local-name "com.apple.iphone.axserver")) ; Needed for Application Accessibility
102
103 ;; <rdar://problem/14555119> Access to high quality speech voices
104 ;; Needed for WebSpeech
105 (allow file-read*
106     (home-subpath "/Library/VoiceServices/Assets")
107     (home-subpath "/Library/Assets/com_apple_MobileAsset_VoiceServicesVocalizerVoice"))
108
109 ;; HearingAidSupport
110 (allow mach-lookup
111     (xpc-service-name "com.apple.accessibility.heard"))
112
113 ;; MediaAccessibility (captions)
114 ;; <rdar://problem/12801477>
115 (mobile-preferences-read "com.apple.mediaaccessibility")
116 (allow mach-lookup (global-name "com.apple.accessibility.mediaaccessibilityd"))
117
118 ;; Permit reading assets via MobileAsset framework.
119 (asset-access 'with-media-playback)
120
121 ;; Network Extensions / VPN helper.
122 (allow mach-lookup
123     (global-name "com.apple.nehelper")
124     (global-name "com.apple.nesessionmanager"))
125
126 ;; allow 3rd party applications to access nsurlstoraged's top level domain data cache
127 (allow-well-known-system-group-container-literal-read
128     "/systemgroup.com.apple.nsurlstoragedresources/Library/dafsaData.bin")
129
130 ;; Access the keyboards
131 (allow file-read*
132     (home-subpath "/Library/Caches/com.apple.keyboards"))
133
134 ;; NSExtension helper for supplying information not provided by PlugInKit
135 (allow mach-lookup
136     (xpc-service-name "com.apple.uifoundation-bundle-helper"))
137
138 ;; <rdar://problem/19525887>
139 (allow mach-lookup (xpc-service-name-regex #"\.apple-extension-service$"))
140 ;; <rdar://problem/31252371>
141 (allow mach-lookup (xpc-service-name-regex #"\.viewservice$"))
142
143 ;; Power logging
144 (allow mach-lookup
145     (global-name "com.apple.powerlog.plxpclogger.xpc")) ;;  <rdar://problem/36442803>
146
147 (mobile-preferences-read
148     "com.apple.EmojiPreferences"
149     ; <rdar://problem/8477596> com.apple.InputModePreferences
150     "com.apple.InputModePreferences"
151     ; <rdar://problem/8206632> Weather(1038) deny file-read-data ~/Library/Preferences/com.apple.keyboard.plist
152     "com.apple.keyboard"
153     ; <rdar://problem/9384085>
154     "com.apple.Preferences"
155     "com.apple.lookup.shared" ; Needed for DataDetector (Spotlight) support
156 )
157
158 ;; Silently deny unnecessary accesses caused by MessageUI framework.
159 ;; This can be removed once <rdar://problem/47038102> is resolved.
160 (deny file-read*
161     (home-literal "/Library/Preferences/com.apple.mobilemail.plist")
162     (with no-log))
163
164 ;; <rdar://problem/12985925> Need read access to /var/mobile/Library/Fonts to all apps
165 (allow file-read*
166     (home-subpath "/Library/Fonts"))
167
168 ;; <rdar://problem/7344719&26323449> LaunchServices app icons
169 (allow file-read*
170     (well-known-system-group-container-subpath "/systemgroup.com.apple.lsd.iconscache"))
171 (allow mach-lookup
172     (xpc-service-name "com.apple.lsdiconservice") ;; Remove this line after <rdar://problem/47151295> is fixed.
173     (xpc-service-name "com.apple.iconservices")
174     (global-name "com.apple.iconservices"))
175
176 ;; Common mach services needed by UIKit.
177 (allow mach-lookup
178     (global-name "com.apple.CARenderServer")
179     (global-name "com.apple.KeyboardServices.TextReplacementService")
180     (global-name "com.apple.assertiond.applicationstateconnection")
181     (global-name "com.apple.assertiond.expiration")
182     (global-name "com.apple.assertiond.processinfoservice")
183     (global-name "com.apple.audio.SystemSoundServer-iOS")
184     (global-name "com.apple.backboard.TouchDeliveryPolicyServer")
185     (global-name "com.apple.backboard.animation-fence-arbiter")
186     (global-name "com.apple.backboard.display.services")
187     (global-name "com.apple.backboard.hid.focus")
188     (global-name "com.apple.backboard.hid.services")
189     (global-name "com.apple.iohideventsystem")
190     (global-name "com.apple.iphone.axserver-systemwide")
191     (global-name "com.apple.frontboard.workspace")
192     (global-name "com.apple.frontboard.systemappservices"))
193
194 ;; <rdar://problem/47268166>
195 (allow mach-lookup (xpc-service-name "com.apple.MTLCompilerService"))
196
197 (allow-preferences-common)
198
199 ;; CoreMotion
200 (mobile-preferences-read "com.apple.CoreMotion")
201
202 ;; CoreMotion’s deviceMotion API
203 (with-filter
204     (require-any
205         (iokit-registry-entry-class "AppleOscarNub")
206         (iokit-registry-entry-class "AppleSPUHIDInterface"))
207     (allow iokit-get-properties
208         (iokit-property "gyro-interrupt-calibration")))
209 (with-filter
210     (iokit-registry-entry-class "IOHIDEventServiceFastPathUserClient")
211     (allow iokit-open)
212     (allow iokit-get-properties iokit-set-properties
213         (iokit-property "interval"
214                         "mode"
215                         "QueueSize"
216                         "useMag"))
217     (allow iokit-get-properties
218         (iokit-property "client")))
219
220 ;; Home Button
221 (with-filter (iokit-registry-entry-class "IOPlatformDevice")
222     (allow iokit-get-properties
223         (iokit-property "home-button-type")))
224
225 ;; Common preferences read by UIKit.
226 (mobile-preferences-read "com.apple.Accessibility"
227     "com.apple.UIKit"
228     "com.apple.WebUI"
229     "com.apple.airplay"
230     "com.apple.avkit"
231     "com.apple.coreanimation"
232     "com.apple.mt"
233     "com.apple.preferences.sounds")
234
235 ;; Silence sandbox violations from apps trying to create the empty plist if it doesn't exist.
236 ;; <rdar://problem/13796537>
237 (deny file-write-create
238     (home-prefix "/Library/Preferences/com.apple.UIKit.plist")
239     (with no-report))
240
241 ;; <rdar://problem/10809394>
242 (deny file-write-create
243     (home-prefix "/Library/Preferences/com.apple.Accessibility.plist")
244     (with no-report))
245
246 ;; <rdar://problem/9404009>
247 (mobile-preferences-read "kCFPreferencesAnyApplication")
248
249 ;; <rdar://problem/12250145>
250 (mobile-preferences-read "com.apple.mediaaccessibility")
251
252 ; Dictionary Services used by UITextFields.
253 ; <rdar://problem/9386926>
254 (allow-create-directory
255     (home-literal "/Library/Caches/com.apple.DictionaryServices"))
256
257 ; <rdar://problem/8548856> Sub-TLF: Sandbox change for apps for read-only access to the dictionary directory/data
258 (allow file-read*
259     ; XXX - /Library ought to be allowed in all UI profiles but isn't (CF, MobileSafari)
260     (subpath "/Library/Dictionaries")
261     (home-subpath "/Library/Dictionaries"))
262
263 ; <rdar://problem/8440231>
264 (allow file-read*
265     (home-literal "/Library/Caches/DateFormats.plist"))
266 ; Silently deny writes when CFData attempts to write to the cache directory.
267 (deny file-write*
268     (home-literal "/Library/Caches/DateFormats.plist")
269     (with no-log))
270
271 ; UIKit-required IOKit nodes.
272 (allow iokit-open
273     (iokit-user-client-class "AppleJPEGDriverUserClient")
274     (iokit-user-client-class "IOSurfaceAcceleratorClient")
275     (iokit-user-client-class "IOSurfaceSendRight")
276     ;; Requires by UIView -> UITextMagnifierRenderer -> UIWindow
277     (iokit-user-client-class "IOSurfaceRootUserClient"))
278
279 ;; <rdar://problem/12675621>
280 (allow iokit-open
281     (iokit-user-client-class "IOHIDLibUserClient"))
282
283 (framebuffer-access)
284
285 ;; <rdar://problem/7822790>
286 (mobile-keybag-access)
287
288 ; <rdar://problem/7595408> , <rdar://problem/7643881>
289 (opengl)
290
291 (location-services)
292
293 ; CRCopyRestrictionsDictionary periodically tries to CFPreferencesAppSynchronize com.apple.springboard.plist
294 ; which will attempt to create the plist if it doesn't exist -- from any application.  Only SpringBoard is
295 ; allowed to write its plist; ignore all others, they don't know what they are doing.
296 ; See <rdar://problem/9375027> for sample backtraces.
297 (deny file-write*
298     (home-prefix "/Library/Preferences/com.apple.springboard.plist")
299     (with no-log))
300
301 ;; <rdar://problem/34092690>
302 (allow mach-lookup
303     (xpc-service-name "com.apple.avkit.SharedPreferences"))
304
305 ;; <rdar://problem/34986314>
306 (mobile-preferences-read "com.apple.indigo")
307
308 ;; <rdar://problem/35417382>, <rdar://problem/35518557>
309 (allow mach-lookup
310     (global-name "com.apple.corespotlightservice"))
311
312 ;; <rdar://problem/35446577>
313 (allow mach-lookup
314     (global-name "com.apple.coremedia.endpointplaybacksession.xpc"))
315
316 ;; <rdar://problem/35509194>
317 (allow mach-lookup
318     (global-name "com.apple.coremedia.endpointremotecontrolsession.xpc"))
319
320 ;;;
321 ;;; End UIKit-apps.sb content
322 ;;;
323
324 (deny sysctl*)
325 (allow sysctl-read
326     (sysctl-name
327         "hw.availcpu"
328         "hw.ncpu"
329         "hw.model"
330         "kern.memorystatus_level"
331         "vm.footprint_suspend"))
332
333 (deny iokit-get-properties (with partial-symbolication))
334 (allow iokit-get-properties
335     (iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)")
336     (iokit-property "APTDevice")
337     (iokit-property "AVCSupported")
338     (iokit-property-regex #"^AppleJPEG(NumCores|Supports(AppleInterchangeFormats|MissingEOI|RSTLogging))")
339     (iokit-property "BaseAddressAlignmentRequirement")
340     (iokit-property-regex #"^DisplayPipe(PlaneBaseAlignment|StrideRequirements)")
341     (iokit-property "HEVCSupported")
342     (iokit-property-regex #"^IOGL(|ES(|Metal))BundleName")
343     (iokit-property "IOGLESDefaultUseMetal")
344     (iokit-property-regex #"IOGVA(BGRAEnc|Codec|EncoderRestricted|Scaler)")
345     (iokit-property "IOClassNameOverride")
346     (iokit-property "IOPlatformUUID")
347     (iokit-property "IOSurfaceAcceleratorCapabilitiesDict")
348     (iokit-property-regex #"^MetalPlugin(Name|ClassName)")
349     (iokit-property "Protocol Characteristics")
350     (iokit-property "artwork-device-subtype")
351     (iokit-property-regex #"(canvas-height|canvas-width)")
352     (iokit-property "class-code")
353     (iokit-property "color-accuracy-index")
354     (iokit-property "device-id")
355     (iokit-property "device-perf-memory-class")
356     (iokit-property "emu")
357     (iokit-property "hdcp-hoover-protocol")
358     (iokit-property "iommu-present")
359     (iokit-property "product-id")
360     (iokit-property "software-behavior")
361     (iokit-property "vendor-id")
362 )
363
364 ;; Read-only preferences and data
365 (mobile-preferences-read
366     "com.apple.LaunchServices"
367     "com.apple.WebFoundation"
368     "com.apple.mobileipod"
369     "com.apple.avfoundation.frecents" ;; <rdar://problem/33137029>
370     "com.apple.avfoundation.videoperformancehud" ;; <rdar://problem/31594568>
371     "com.apple.voiceservices.logging")
372
373 ;; Sandbox extensions
374 (define (apply-read-and-issue-extension op path-filter)
375     (op file-read* path-filter)
376     (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") path-filter)))
377 (define (apply-write-and-issue-extension op path-filter)
378     (op file-write* path-filter)
379     (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") path-filter)))
380 (define (read-only-and-issue-extensions path-filter)
381     (apply-read-and-issue-extension allow path-filter))
382 (define (read-write-and-issue-extensions path-filter)
383     (apply-read-and-issue-extension allow path-filter)
384     (apply-write-and-issue-extension allow path-filter))
385 (read-only-and-issue-extensions (extension "com.apple.app-sandbox.read"))
386 (read-write-and-issue-extensions (extension "com.apple.app-sandbox.read-write"))
387
388 ;; Access to client's cache folder & re-vending to CFNetwork.
389 ;; FIXME: Remove the webkti specific extension classes <rdar://problem/17755931>
390 (allow file-issue-extension (require-all
391     (extension "com.apple.app-sandbox.read-write")
392     (extension-class "com.apple.nsurlstorage.extension-cache")))
393
394 ;; MediaAccessibility
395 (mobile-preferences-read "com.apple.mediaaccessibility")
396 (mobile-preferences-read-write "com.apple.mediaaccessibility.public")
397
398 ;; Remote Web Inspector
399 (allow mach-lookup
400        (global-name "com.apple.webinspector"))
401
402 ;; Various services required by CFNetwork and other frameworks
403 (allow mach-lookup
404     (global-name "com.apple.PowerManagement.control")
405     (global-name "com.apple.accountsd.accountmanager")
406     (global-name "com.apple.analyticsd")
407     (global-name "com.apple.coremedia.audiodeviceclock"))
408
409 (deny file-write-create (vnode-type SYMLINK))
410 (deny file-read-xattr file-write-xattr (xattr-regex #"^com\.apple\.security\.private\."))
411
412 ;; Allow loading injected bundles.
413 (allow file-map-executable)
414
415 ;; AWD logging
416 (awd-log-directory "com.apple.WebKit.WebContent")
417
418 ;; Allow ManagedPreference access
419 (allow file-read* (literal "/private/var/Managed Preferences/mobile/com.apple.webcontentfilter.plist"))
420
421 (allow file-read-data
422     (literal "/usr/local/lib/log") ; <rdar://problem/36629495>
423 )
424
425 ;; Allow mediaserverd to issue file extensions for the purposes of reading media
426 (allow file-issue-extension (require-all
427     (extension "com.apple.app-sandbox.read")
428     (extension-class "com.apple.mediaserverd.read")))
429
430 ;; Allow CoreMedia to communicate with mediaserverd in order to implement custom media loading
431 (allow mach-lookup
432     (global-name "com.apple.coremedia.customurlloader.xpc"))
433
434 ;; Media capture, microphone access
435 (with-filter (extension "com.apple.webkit.microphone")
436     (allow device-microphone))
437
438 ;; Media capture, camera access
439 (with-filter (extension "com.apple.webkit.camera")
440     (allow user-preference-read
441         (preference-domain "com.apple.coremedia"))
442     (allow file-read* (subpath "/Library/CoreMediaIO/Plug-Ins/DAL"))
443     (allow mach-lookup (extension "com.apple.app-sandbox.mach"))
444     (allow device-camera))
445
446 ;; Support incoming video connections
447 (allow mach-lookup
448     (global-name "com.apple.audio.audiohald")
449     (global-name "com.apple.coremedia.compressionsession")
450     (global-name "com.apple.coremedia.decompressionsession")
451     (global-name "com.apple.coremedia.videoqueue"))
452
453 ;; These services have been identified as unused during living-on.
454 ;; This list overrides some definitions above and in common.sb.
455 ;; FIXME: remove overridden rules once the final list has been
456 ;; established, see https://bugs.webkit.org/show_bug.cgi?id=193840
457 (deny mach-lookup
458     (global-name "com.apple.AGXCompilerService")
459     (global-name "com.apple.CoreAuthentication.daemon.libxpc")
460     (global-name "com.apple.FileCoordination")
461     (global-name "com.apple.FileProvider")
462     (global-name "com.apple.Honeybee.event-notify")
463     (global-name "com.apple.KeyboardServices.TextReplacementService")
464     (global-name "com.apple.MediaPlayer.RemotePlayerService")
465     (global-name "com.apple.ReportCrash.SimulateCrash")
466     (global-name "com.apple.TextInput.emoji")
467     (global-name "com.apple.TextInput.image-cache-server")
468     (global-name "com.apple.TextInput.lexicon-server")
469     (global-name "com.apple.TextInput.preferences")
470     (global-name "com.apple.TextInput.rdt")
471     (global-name "com.apple.TextInput.shortcuts")
472     (global-name "com.apple.UIKit.KeyboardManagement")
473     (global-name "com.apple.UIKit.KeyboardManagement.hosted")
474     (global-name "com.apple.accessibility.AXBackBoardServer")
475     (global-name "com.apple.accessibility.AccessibilityUIServer")
476     (global-name "com.apple.accessibility.heard")
477     (global-name "com.apple.accountsd.accountmanager")
478     (global-name "com.apple.app-sandbox.mach")
479     (global-name "com.apple.appsupport.cplogd")
480     (global-name "com.apple.assertiond.applicationstateconnection")
481     (global-name "com.apple.assertiond.expiration")
482     (global-name "com.apple.assertiond.processassertionconnection")
483     (global-name "com.apple.assertiond.processinfoservice")
484     (global-name "com.apple.audio.AudioComponentPrefs")
485     (global-name "com.apple.audio.AudioQueueServer")
486     (global-name "com.apple.audio.SystemSoundServer-iOS")
487     (global-name "com.apple.audio.audiohald")
488     (global-name "com.apple.audio.reporting.xpc")
489     (global-name "com.apple.avkit.SharedPreferences")
490     (global-name "com.apple.backboard.TouchDeliveryPolicyServer")
491     (global-name "com.apple.backboard.animation-fence-arbiter")
492     (global-name "com.apple.backboard.display.services")
493     (global-name "com.apple.backboard.hid.focus")
494     (global-name "com.apple.bird")
495     (global-name "com.apple.bird.token")
496     (global-name "com.apple.cfprefsd.agent")
497     (global-name "com.apple.containermanagerd")
498     (global-name "com.apple.coremedia.assetcacheinspector")
499     (global-name "com.apple.coremedia.audiodeviceclock")
500     (global-name "com.apple.coremedia.audioprocessingtap.xpc")
501     (global-name "com.apple.coremedia.compressionsession")
502     (global-name "com.apple.coremedia.endpointplaybacksession.xpc")
503     (global-name "com.apple.coremedia.endpointremotecontrolsession.xpc")
504     (global-name "com.apple.coremedia.sandboxserver")
505     (global-name "com.apple.coremedia.videocompositor")
506     (global-name "com.apple.coremedia.visualcontext.xpc")
507     (global-name "com.apple.coreservices.lsuseractivitymanager.xpc")
508     (global-name "com.apple.corespotlightservice")
509     (global-name "com.apple.ctkd.token-client")
510     (global-name "com.apple.cvmsServ")
511     (global-name "com.apple.duetknowledged.activity")
512     (global-name "com.apple.dyld.closured")
513     (global-name "com.apple.frontboard.workspace")
514     (global-name "com.apple.gpumemd.source")
515     (global-name "com.apple.hangtracerd")
516     (global-name "com.apple.itunescloudd.xpc")
517     (global-name "com.apple.itunesstored.xpc")
518     (global-name "com.apple.librariand")
519     (global-name "com.apple.locationd.spi")
520     (global-name "com.apple.locationd.synchronous")
521     (global-name "com.apple.lsd")
522     (global-name "com.apple.lsd.advertisingidentifiers")
523     (global-name "com.apple.lsd.icons")
524     (global-name "com.apple.lsd.openurl")
525     (global-name "com.apple.lsdiconservice")
526     (global-name "com.apple.managedconfiguration.profiled.public")
527     (global-name "com.apple.marco")
528     (global-name "com.apple.mediaserverd")
529     (global-name "com.apple.mobile.usermanagerd.xpc")
530     (global-name "com.apple.nehelper")
531     (global-name "com.apple.nesessionmanager")
532     (global-name "com.apple.pegasus")
533     (global-name "com.apple.pluginkit.pkd")
534     (global-name "com.apple.pluginkit.plugin-service")
535     (global-name "com.apple.quicklook.ThumbnailsAgent")
536     (global-name "com.apple.revisiond")
537     (global-name "com.apple.siri.context.service")
538     (global-name "com.apple.springboard.backgroundappservices")
539     (global-name "com.apple.system.libinfo.muser")
540     (global-name "com.apple.uifoundation-bundle-helper")
541     (global-name "com.apple.webkit.camera")
542 )
543
544 (when (defined? 'syscall-unix)
545     (allow syscall-unix (with report))
546     (allow syscall-unix
547         (syscall-number SYS_exit)
548         (syscall-number SYS_read)
549         (syscall-number SYS_write)
550         (syscall-number SYS_open)
551         (syscall-number SYS_close)
552         (syscall-number SYS_unlink)
553         (syscall-number SYS_chmod)
554         (syscall-number SYS_getuid)
555         (syscall-number SYS_geteuid)
556         (syscall-number SYS_recvfrom)
557         (syscall-number SYS_getpeername)
558         (syscall-number SYS_access)
559         (syscall-number SYS_dup)
560         (syscall-number SYS_pipe)
561         (syscall-number SYS_getegid)
562         (syscall-number SYS_getgid)
563         (syscall-number SYS_sigprocmask)
564         (syscall-number SYS_sigaltstack)
565         (syscall-number SYS_ioctl)
566         (syscall-number SYS_readlink)
567         (syscall-number SYS_umask)
568         (syscall-number SYS_msync)
569         (syscall-number SYS_munmap)
570         (syscall-number SYS_mprotect)
571         (syscall-number SYS_madvise)
572         (syscall-number SYS_fcntl)
573         (syscall-number SYS_select)
574         (syscall-number SYS_fsync)
575         (syscall-number SYS_setpriority)
576         (syscall-number SYS_socket)
577         (syscall-number SYS_connect)
578         (syscall-number SYS_setsockopt)
579         (syscall-number SYS_gettimeofday)
580         (syscall-number SYS_getrusage)
581         (syscall-number SYS_getsockopt)
582         (syscall-number SYS_writev)
583         (syscall-number SYS_fchmod)
584         (syscall-number SYS_rename)
585         (syscall-number SYS_flock)
586         (syscall-number SYS_sendto)
587         (syscall-number SYS_shutdown)
588         (syscall-number SYS_socketpair)
589         (syscall-number SYS_mkdir)
590         (syscall-number SYS_rmdir)
591         (syscall-number SYS_pread)
592         (syscall-number SYS_pwrite)
593         (syscall-number SYS_csops)
594         (syscall-number SYS_csops_audittoken)
595         (syscall-number SYS_kdebug_trace64)
596         (syscall-number SYS_kdebug_trace)
597         (syscall-number SYS_sigreturn)
598         (syscall-number SYS_pathconf)
599         (syscall-number SYS_getrlimit)
600         (syscall-number SYS_setrlimit)
601         (syscall-number SYS_mmap)
602         (syscall-number SYS_lseek)
603         (syscall-number SYS_ftruncate)
604         (syscall-number SYS_sysctl)
605         (syscall-number SYS_mlock)
606         (syscall-number SYS_munlock)
607         (syscall-number SYS_getattrlist)
608         (syscall-number SYS_getxattr)
609         (syscall-number SYS_fgetxattr)
610         (syscall-number SYS_listxattr)
611         (syscall-number SYS_shm_open)
612         (syscall-number SYS_sem_wait)
613         (syscall-number SYS_sem_post)
614         (syscall-number SYS_sysctlbyname)
615         (syscall-number SYS_psynch_mutexwait)
616         (syscall-number SYS_psynch_mutexdrop)
617         (syscall-number SYS_psynch_cvbroad)
618         (syscall-number SYS_psynch_cvsignal)
619         (syscall-number SYS_psynch_cvwait)
620         (syscall-number SYS_psynch_rw_wrlock)
621         (syscall-number SYS_psynch_rw_unlock)
622         (syscall-number SYS_psynch_cvclrprepost)
623         (syscall-number SYS_process_policy)
624         (syscall-number SYS_issetugid)
625         (syscall-number SYS___pthread_kill)
626         (syscall-number SYS___pthread_sigmask)
627         (syscall-number SYS___disable_threadsignal)
628         (syscall-number SYS___semwait_signal)
629         (syscall-number SYS_proc_info)
630         (syscall-number SYS_stat64)
631         (syscall-number SYS_fstat64)
632         (syscall-number SYS_lstat64)
633         (syscall-number SYS_getdirentries64)
634         (syscall-number SYS_statfs64)
635         (syscall-number SYS_fstatfs64)
636         (syscall-number SYS_getfsstat64)
637         (syscall-number SYS_getaudit_addr)
638         (syscall-number SYS_bsdthread_create)
639         (syscall-number SYS_bsdthread_terminate)
640         (syscall-number SYS_workq_kernreturn)
641         (syscall-number SYS_thread_selfid)
642         (syscall-number SYS_kevent_qos)
643         (syscall-number SYS_kevent_id)
644         (syscall-number SYS___mac_syscall)
645         (syscall-number SYS_read_nocancel)
646         (syscall-number SYS_write_nocancel)
647         (syscall-number SYS_open_nocancel)
648         (syscall-number SYS_close_nocancel)
649         (syscall-number SYS_sendmsg_nocancel)
650         (syscall-number SYS_recvfrom_nocancel)
651         (syscall-number SYS_fcntl_nocancel)
652         (syscall-number SYS_select_nocancel)
653         (syscall-number SYS_connect_nocancel)
654         (syscall-number SYS_sendto_nocancel)
655         (syscall-number SYS_fsgetpath)
656         (syscall-number SYS_fileport_makeport)
657         (syscall-number SYS_guarded_open_np)
658         (syscall-number SYS_guarded_close_np)
659         (syscall-number SYS_change_fdguard_np)
660         (syscall-number SYS_proc_rlimit_control)
661         (syscall-number SYS_connectx)
662         (syscall-number SYS_getattrlistbulk)
663         (syscall-number SYS_openat)
664         (syscall-number SYS_openat_nocancel)
665         (syscall-number SYS_fstatat64)
666         (syscall-number SYS_mkdirat)
667         (syscall-number SYS_bsdthread_ctl)
668         (syscall-number SYS_csrctl)
669         (syscall-number SYS_guarded_pwrite_np)
670         (syscall-number SYS_getentropy)
671         (syscall-number SYS_necp_open)
672         (syscall-number SYS_necp_client_action)
673         (syscall-number SYS_ulock_wait)
674         (syscall-number SYS_ulock_wake)
675         (syscall-number SYS_kdebug_typefilter)
676         (syscall-number SYS_shared_region_check_np)
677         (syscall-number SYS_getpid)
678         (syscall-number SYS_bsdthread_register)
679         (syscall-number SYS_sigaction)
680         (syscall-number SYS_gettid)
681         (syscall-number SYS_workq_open)
682         (syscall-number SYS_chdir)
683         (syscall-number SYS_memorystatus_control)
684         (syscall-number SYS_sem_open)
685         (syscall-number SYS_sem_close)
686         (syscall-number SYS_fsetattrlist)
687         (syscall-number SYS_guarded_open_dprotected_np) ; <rdar://problem/48166729>
688     )
689 )