Allow NSFileCoordinator to be called from WebContent process
[WebKit-https.git] / Source / WebKit / WebProcess / com.apple.WebProcess.sb.in
1 ; Copyright (C) 2010-2018 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 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
29 (import "system.sb")
30 #else
31 ;;;
32 ;;; The following rules were originally contained in 'system.sb'. We are duplicating them here so we can
33 ;;; remove unneeded sandbox extensions.
34 ;;;
35
36 ;;; Allow registration of per-pid services.
37 (allow mach-register (local-name-prefix ""))
38
39 ;;; Allow read access to standard system paths.
40 (allow file-read*
41     (require-all (file-mode #o0004)
42     (require-any (subpath "/Library/Filesystems/NetFSPlugins")
43     (subpath "/Library/Apple/System")
44     (subpath "/Library/Preferences/Logging")      ; Logging Rethink
45     (subpath "/System")
46     (subpath "/private/var/db/dyld")
47     (subpath "/private/var/db/timezone")
48     (subpath "/usr/lib")
49     (subpath "/usr/share"))))
50
51 ;;; Allow reading internal profiles on development builds
52 (allow file-read*
53     (require-all (file-mode #o0004)
54     (subpath "/AppleInternal/Library/Preferences/Logging")
55     (system-attribute apple-internal)))
56
57 ;;; Allow mapping of system frameworks + dylibs
58 (allow file-map-executable
59     (subpath "/Library/Apple/System/Library/Frameworks")
60     (subpath "/Library/Apple/System/Library/PrivateFrameworks")
61     (subpath "/System/Library/Frameworks")
62     (subpath "/System/Library/PrivateFrameworks")
63     (subpath "/usr/lib")
64     (literal "/usr/local/lib/sanitizers"))
65
66 (allow file-read-metadata
67     (literal "/etc")
68     (literal "/tmp")
69     (literal "/var")
70     (literal "/private/etc/localtime"))
71
72
73 ;;; Allow access to standard special files.
74 (allow file-read*
75     (literal "/dev/autofs_nowait")
76     (literal "/dev/random")
77     (literal "/dev/urandom")
78     (literal "/private/etc/master.passwd")
79     (literal "/private/etc/passwd"))
80
81 (allow file-read*
82        file-write-data
83     (literal "/dev/null")
84     (literal "/dev/zero"))
85
86 (allow file-read*
87        file-write-data
88        file-ioctl
89     (literal "/dev/dtracehelper"))
90
91 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
92 (allow network-outbound
93     (literal "/private/var/run/asl_input")
94     (literal "/private/var/run/syslog"))
95 #endif
96
97 ;;; Allow creation of core dumps.
98 (allow file-write-create
99     (require-all (prefix "/cores/")
100         (vnode-type REGULAR-FILE)))
101
102
103 ;;; Allow IPC to standard system agents.
104 (allow ipc-posix-shm-read*
105     (ipc-posix-name "apple.shm.notification_center")
106     (ipc-posix-name-prefix "apple.cfprefs."))
107
108 ;;; (system-graphics) - Allow access to graphics hardware.
109 (define (system-graphics)
110     ;; Preferences
111     (allow user-preference-read
112         (preference-domain "com.apple.opengl")
113         (preference-domain "com.nvidia.OpenGL"))
114     ;; CVMS
115     (allow mach-lookup
116         (global-name "com.apple.cvmsServ"))
117 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
118     (allow file-read*
119         (prefix "/private/var/db/CVMS/cvmsCodeSignObj"))
120 #endif
121     ;; OpenCL
122     (allow iokit-open
123         (iokit-connection "IOAccelerator")
124         (iokit-registry-entry-class "IOAccelerationUserClient")
125         (iokit-registry-entry-class "IOSurfaceRootUserClient")
126         (iokit-registry-entry-class "IOSurfaceSendRight"))
127     ;; CoreVideo CVCGDisplayLink
128     (allow iokit-open
129         (iokit-registry-entry-class "IOFramebufferSharedUserClient"))
130     ;; H.264 Acceleration
131     (allow iokit-open
132         (iokit-registry-entry-class "AppleIntelMEUserClient")
133         (iokit-registry-entry-class "AppleSNBFBUserClient"))
134     ;; QuartzCore
135     (allow iokit-open
136         (iokit-registry-entry-class "AGPMClient")
137         (iokit-registry-entry-class "AppleGraphicsControlClient")
138         (iokit-registry-entry-class "AppleGraphicsPolicyClient"))
139     ;; OpenGL
140     (allow iokit-open
141         (iokit-registry-entry-class "AppleMGPUPowerControlClient"))
142     ;; GPU bundles
143     (allow file-read*
144         (subpath "/Library/GPUBundles"))
145     ;; DisplayServices
146     (allow iokit-set-properties
147         (require-all (iokit-connection "IODisplay")
148         (require-any (iokit-property "brightness")
149         (iokit-property "linear-brightness")
150         (iokit-property "commit")
151         (iokit-property "rgcs")
152         (iokit-property "ggcs")
153         (iokit-property "bgcs")))))
154
155 ;;;
156 ;;; End rules originally copied from 'system.sb'
157 ;;;
158 #endif
159
160 ;;; process-info* defaults to allow; deny it and then allow operations we actually need.
161 (deny process-info*)
162 (allow process-info-pidinfo)
163 (allow process-info-setcontrol (target self))
164 (allow process-codesigning-status*)
165
166 (deny sysctl*)
167 (allow sysctl-read
168     (sysctl-name
169         "hw.byteorder"
170         "hw.busfrequency_max"
171         "hw.cputype"
172         "hw.machine"
173         "hw.memsize"
174         "hw.model"
175         "hw.ncpu"
176         "hw.vectorunit"
177         "kern.bootargs" ;; <rdar://problem/47738015>
178         "kern.hostname"
179         "kern.maxfilesperproc"
180         "kern.memorystatus_level"
181         "kern.safeboot"
182         "kern.version"
183         "machdep.cpu.brand_string"
184         "security.mac.sandbox.sentinel"
185         "kern.tcsm_enable"
186         "kern.tcsm_available"
187         "vm.footprint_suspend")
188     (sysctl-name-regex #"^hw.(active|avail)cpu")
189     (sysctl-name-regex #"^hw.(busfrequency|cachelinesize|cpufrequency(|_max)|pagesize|tbfrequency)(|_compat)")
190     (sysctl-name-regex #"^hw.l.+cachesize")
191     (sysctl-name-regex #"^hw.(logical|physical)cpu_max")
192     (sysctl-name-regex #"^hw.optional\.")
193     (sysctl-name-regex #"^kern.os(release|type|variant_status|version)")
194     (sysctl-name-regex #"^net.routetable")
195 )
196
197 (allow sysctl-write
198     (sysctl-name
199         "kern.tcsm_enable"))
200
201 (deny iokit-get-properties)
202 (allow iokit-get-properties
203     (iokit-property "AAPL,LCD-PowerState-ON") ;; <rdar://problem/47738015>
204     (iokit-property "AGCInfo")
205     (iokit-property-regex #"^Accel(Caps|NativeDMARowByteAlignment)")
206     (iokit-property-regex #"^(Accurate|Extended)MaxDigitizerPressureValue")
207     (iokit-property-regex #"^(Activation|Animation)Thresholds")
208     (iokit-property "ActuationSupported")
209     (iokit-property "AllowDisplaySleep")
210     (iokit-property "AlwaysNeedsVelocityCalculated")
211     (iokit-property-regex #"Apple(GVAKeyDoesNotExist|IntelMEVABundleName)")
212     (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)")
213     (iokit-property-regex #"^ATY,(cbits|fb_(linebytes|offset|size)|intrev)")
214     (iokit-property "AVCSupported")
215     (iokit-property "BacklightHandle")
216     (iokit-property "BlockSize")
217     (iokit-property-regex #"^CEA(ModeID|PixelRepetition)")
218     (iokit-property "CFBundleIdentifier")
219     (iokit-property "CFBundleIdentifierKernel") ;; <rdar://problem/47738015>
220     (iokit-property "CapsLockDelay")
221     (iokit-property "CaseSensitive")
222     (iokit-property "ConfigState")
223     (iokit-property "Description")
224     (iokit-property "Development")
225     (iokit-property-regex #"^Device( Characteristics|EqID)")
226     (iokit-property "DisplayRouting")
227     (iokit-property "Driver is Ready")
228     (iokit-property "Ejectable")
229     (iokit-property "EnableLPVP")
230     (iokit-property "Encrypted")
231     (iokit-property "Endianness")
232     (iokit-property "Family ID")
233     (iokit-property "ForceSupported")
234     (iokit-property "Formats")
235     (iokit-property "GPUConfigurationVariable")
236     (iokit-property "GpuDebugPolicy")
237     (iokit-property "HEVCSupported")
238     (iokit-property "HIDPointerAccelerationType")
239     (iokit-property-regex #"^IOAccel(DisplayPipeCapabilities|Index|Types|Revision)")
240     (iokit-property-regex #"^IO(Class|MatchCategory|NameMatch)")
241     (iokit-property-regex #"^IOAudioControl(ChannelID|ID|SubType|Usage|Value)")
242     (iokit-property-regex #"^IOAudioDevice(CanBeDefaults|TransportType)")
243     (iokit-property-regex #"^IOAudioEngine(ChannelNames|ClientDescription|CoreAudioPlugIn|(|Device)Description|Flavor|GlobalUniqueID|IsHidden|OutputChannelLayout|SampleOffset|State)")
244     (iokit-property-regex #"^IOAudioEngineClock(Domain|IsStable)")
245     (iokit-property "IOAudioEngineDisableClockBoundsCheck")
246     (iokit-property-regex #"^IOAudioEngine(Input|Output)Sample(Latency|Offset)")
247     (iokit-property-regex #"^IOAudioEngineNum(ActiveUserClients|SampleFramesPerBuffer)")
248     (iokit-property "IOAudioSampleRate")
249     (iokit-property "IOAudioStreamSampleFormatByteOrder")
250     (iokit-property-regex #"^IOAV(.*)(De|En)code$")
251     (iokit-property "IOBacklightHandlerID")
252     (iokit-property "IOBusyInterest")
253     (iokit-property "IOCFPlugInTypes")
254     (iokit-property "IOChildIndex")
255     (iokit-property-regex #"^IOClass(|NameOverride)")
256     (iokit-property "IOConsoleUsers")
257     (iokit-property "IODVDBundleName")
258     (iokit-property "IODeviceMemory")
259     (iokit-property "IODisplayParameters")
260     (iokit-property-regex #"^IOFB(CLUTDefer|Config|CursorInfo|Dependent(ID|Index))")
261     (iokit-property "IOFBCurrentPixelClock")
262     (iokit-property-regex #"^IOFBCurrentPixelCount(|Real)")
263     (iokit-property-regex #"^IOFB(DetailedTimings|Gamma(Count|HeaderSize|Width))")
264     (iokit-property-regex #"^IOFB(Blue|Green|Red)GammaScale")
265     (iokit-property-regex #"^IOFBI2CInterface(IDs|Info)")
266     (iokit-property-regex #"^IOFB(HDMIDongleROM|Integrated|MemorySize|NeedsRefresh|ProbeOptions|ScalerInfo|TimingRange|Transform|UIScale|WaitCursor(Frames|Period))")
267     (iokit-property "IOFramebufferOpenGLIndex")
268     (iokit-property "IOGeneralInterest")
269     (iokit-property "IOGLBundleName")
270     (iokit-property-regex #"^IOGVA(BGRAEnc|Codec|EncoderRestricted|Scaler|VTCapabilities|HEVCDecodeCapabilities|HEVCEncodeCapabilities)")
271     (iokit-property-regex #"^IOGVA(.*)(De|En)code$")
272     (iokit-property "IOHibernateState")
273     (iokit-property "IOI2CTransactionTypes")
274     (iokit-property-regex #"^IOInterrupt(Controllers|Specifiers)")
275     (iokit-property "IOKitDebug")
276     (iokit-property "IOMatchCategory")
277     (iokit-property "IOMediaIcon")
278     (iokit-property "IONDRVFramebufferGeneration")
279     (iokit-property "IONVRAMProperty")
280     (iokit-property-regex #"^IOName(|Match(|ed))")
281     (iokit-property "IOOCDBundleName")
282     (iokit-property "IOPCITunnelled")
283     (iokit-property "IOPCITunnelCompatible")
284     (iokit-property "IOPMStrictTreeOrder")
285     (iokit-property "IOParentMatch")
286     (iokit-property-regex #"^IOPCI((Class|Primary|Property|)Match|Express(Capabilities|Link(Status|Capabilities))|MSIMode|Resourced|Tunnelled)")
287     (iokit-property "IOPMIsPowerManaged")
288     (iokit-property-regex #"^IOPlatform(SerialNumber|UUID)")
289     (iokit-property "IOPowerManagement")
290     (iokit-property "IOProbeScore")
291     (iokit-property "IOPropertyMatch")
292     (iokit-property "IOProviderClass")
293     (iokit-property-regex #"^IOReport(Lures|Legend(|Public))")
294     (iokit-property "IOScreenRestoreState")
295     (iokit-property "IOSourceVersion")
296     (iokit-property-regex #"^IOVA(BundleName|Renderer(|Sub)ID)")
297     (iokit-property-regex #"^InternalStatistics(|Accm)")
298     (iokit-property-regex #"^MetalPlugin(Name|ClassName)")
299     (iokit-property "MetalStatisticsName")
300     (iokit-property "MTHIDDevice")
301     (iokit-property "MT Built-In")
302     (iokit-property "MaintainPowerInUILock")
303     (iokit-property "Max Packet Size")
304     (iokit-property "MinDigitizerPressureValue")
305     (iokit-property "Multitouch Serial Number")
306     (iokit-property-regex #"^Multitouch (Subdevice |)ID")
307     (iokit-property "NVArch")
308     (iokit-property-regex #"^NVC(AP|LASS)")
309     (iokit-property-regex #"^NVDA,(Features|NVPresentment-version|accel-loaded|invalid-config|mm-version)")
310     (iokit-property "NVDA,Enable-A2R10G10B10Format")
311     (iokit-property-regex #"^NVDA(Type|initgl_created)")
312     (iokit-property "NVRAMProperty")
313     (iokit-property "NXSystemInfo")
314     (iokit-property-regex #"^VRAM,(memvendorID|total(MB|size))")
315     (iokit-property "NoAutoRoute")
316     (iokit-property-regex #"^Num(Blocks|Streams)")
317     (iokit-property-regex #"^PerformanceStatistics(|Accum)")
318     (iokit-property "Protocol Characteristics")
319     (iokit-property "Removable")
320     (iokit-property-regex #"^ResetOn(Lock|Unlock)Ms")
321     (iokit-property "SafeEjectRequested")
322     (iokit-property "SampleRates")
323     (iokit-property "Serial Number")
324     (iokit-property "StartupDisplay")
325     (iokit-property "SurfaceList")
326     (iokit-property-regex #"^Support(AudioAUUC|sSilentClick|TapToWake)")
327     (iokit-property-regex #"^Sensor (Columns|Rows)")
328     (iokit-property-regex #"^Sensor Region (Descriptor|Param|Rows)")
329     (iokit-property-regex #"^Sensor Surface (Descriptor|Height|Width)")
330     (iokit-property "SurfaceList")
331     (iokit-property "TimeStampFiltering")
332     (iokit-property "Transport")
333     (iokit-property "USBADC") ;; Needed for Audio support on older hardware
334     (iokit-property "UserClientEnabled")
335     (iokit-property "VRAM,totalMB")
336     (iokit-property "WANTS_FRAMES_IGNORED")
337     (iokit-property-regex #"^acpi-(device|path)")
338     (iokit-property "assigned-addresses")
339     (iokit-property "attached-gpu-control-path")
340     (iokit-property-regex #"^audio-(codec-info|device-mvalue|device-nvalue|selector)")
341     (iokit-property "av-signal-type")
342     (iokit-property "bcdVersion")
343     (iokit-property-regex #"^(board|device|revision|subsystem|vendor)-id")
344     (iokit-property "boot-gamma-restored")
345     (iokit-property "built-in")
346     (iokit-property "cail_properties")
347     (iokit-property-regex #"^canvas-(height|width)")
348     (iokit-property "class-code")
349     (iokit-property "color-accuracy-index")
350     (iokit-property "compatible")
351     (iokit-property "connector-type")
352     (iokit-property-regex #"^(device|revision|subsystem-vendor|touch-size)-id")
353     (iokit-property "device_type")
354     (iokit-property "dpm")
355     (iokit-property "errordb") ;; Needed for OpenGL on older hardware
356     (iokit-property "graphic-options")
357     (iokit-property "hda-gfx")
358     (iokit-property-regex #"^id(Product|Vendor)")
359     (iokit-property "iofb_version")
360     (iokit-property "image-encrypted")
361     (iokit-property "locationID") ;; Needed for Audio support on older hardware
362     (iokit-property "model")
363     (iokit-property "mt-device-id")
364     (iokit-property "name")
365     (iokit-property "nv-stats")
366     (iokit-property-regex #"^parser-(options|type)")
367     (iokit-property-regex #"^pci(-aspm-default|debug)")
368     (iokit-property "port-number")
369     (iokit-property "reg")
370     (iokit-property "rm_board_number")
371     (iokit-property-regex #"^(rom|vbios)-revision")
372     (iokit-property "saved-config")
373     (iokit-property "startup-timing")
374     (iokit-property "touch-size-id")
375 #if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
376     (iokit-property "ATY,cbits")
377     (iokit-property "ATY,intrev")
378     (iokit-property "AccelNativeDMARowByteAlignment")
379     (iokit-property "CompactVRAM")
380     (iokit-property "EnableBlitLib")
381     (iokit-property "ForceDisableEDRAM")
382     (iokit-property "GPUConfigurationVariable")
383     (iokit-property "GpuDebugPolicy")
384     (iokit-property "IOKitDebug")
385     (iokit-property "IOPCIMatch")
386     (iokit-property "IOOCDBundleName")
387     (iokit-property "MetalStatisticsScriptName")
388     (iokit-property "MetalCoalesce")
389     (iokit-property "PanicOnGPUHang")
390     (iokit-property "TelemetryDisable")
391     (iokit-property "cail_properties")
392     (iokit-property "dpm")
393 #endif
394     (iokit-property "IOGVAH264EncodeCapabilities") ;; <rdar://problem/49498040>
395 )
396
397 #if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
398 (deny mach-lookup (xpc-service-name-prefix ""))
399 (allow mach-lookup
400     (xpc-service-name "com.apple.PerformanceAnalysis.animationperfd")
401     (xpc-service-name "com.apple.accessibility.mediaaccessibilityd")
402     (xpc-service-name "com.apple.audio.SandboxHelper")
403     (xpc-service-name "com.apple.coremedia.videodecoder")
404     (xpc-service-name "com.apple.coremedia.videoencoder")
405     (xpc-service-name-regex #"\.apple-extension-service$")
406     (xpc-service-name "com.apple.hiservices-xpcservice")
407     (xpc-service-name "com.apple.print.normalizerd")
408 )
409 #endif
410
411 ;; Utility functions for home directory relative path filters
412 (define (home-regex home-relative-regex)
413   (regex (string-append "^" (regex-quote (param "HOME_DIR")) home-relative-regex)))
414
415 (define (home-subpath home-relative-subpath)
416   (subpath (string-append (param "HOME_DIR") home-relative-subpath)))
417
418 (define (home-literal home-relative-literal)
419   (literal (string-append (param "HOME_DIR") home-relative-literal)))
420
421 (define (allow-read-directory-and-issue-read-extensions path)
422     (if path
423         (begin
424             (allow file-read* (subpath path))
425             (allow file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") (subpath path))))))
426
427 (define (allow-read-write-directory-and-issue-read-write-extensions path)
428     (if path
429         (begin
430             (allow file-read* file-write* (subpath path))
431             (allow file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") (subpath path)))
432             (allow file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") (subpath path))))))
433
434 ;; Remove when <rdar://problem/29646094> is fixed.
435 (define (HEX-pattern-match-generator pattern-descriptor)
436     (letrec ((pattern-string ""))
437         (for-each  (lambda (repeat-count)
438             (if (zero? repeat-count)
439                 (set! pattern-string (string-append  pattern-string "-"))
440                 (let appender ((count repeat-count))
441                     (if (> count 0)
442                         (begin
443                             (set! pattern-string (string-append  pattern-string "[0-9A-F]"))
444                             (appender (- count 1)))))))
445             pattern-descriptor)
446     pattern-string))
447
448 ;; return a regex pattern matching string for 8-4-4-4-12 UUIDs:
449 (define (uuid-HEX-pattern-match-string)
450     (HEX-pattern-match-generator '(8 0 4 0 4 0 4 0 12)))
451
452 ;; global to hold the computed UUID matching pattern.
453 (define *uuid-pattern* "")
454
455 (define (uuid-regex-string)
456     (if (zero? (string-length *uuid-pattern*))
457         (set! *uuid-pattern* (uuid-HEX-pattern-match-string)))
458     *uuid-pattern*)
459
460 ;; Read-only preferences and data
461 (allow file-read*
462     ;; Basic system paths
463     (subpath "/Library/Dictionaries")
464     (subpath "/Library/Fonts")
465     (subpath "/Library/Frameworks")
466     (subpath "/Library/Managed Preferences")
467     (subpath "/Library/Speech/Synthesizers")
468     (regex #"^/private/etc/(hosts|group|passwd)$")
469
470     (literal "/Library/Application Support/CrashReporter/SubmitDiagInfo.domains")
471
472     ;; System and user preferences
473     (home-literal "/.CFUserTextEncoding")
474
475     ;; FIXME: This should be removed when <rdar://problem/8957845> is fixed.
476     (home-subpath "/Library/Fonts")
477
478     (subpath "/Library/Audio/Plug-Ins/HAL")
479
480     (home-subpath "/Library/Dictionaries"))
481
482 (allow file-read-data
483     (literal "/usr/local/lib/log") ; <rdar://problem/36629495>
484     ;; Needed for AES3 support
485     (subpath "/Library/Audio/Plug-Ins/Components"))
486
487 ;; Preferences support
488 (allow user-preference-read
489     (preference-domain
490         "kCFPreferencesAnyApplication"
491         "com.apple.ATS"
492         "com.apple.CoreGraphics"
493         "com.apple.DownloadAssessment"
494         "com.apple.HIToolbox"
495         "com.apple.LaunchServices"
496         "com.apple.MultitouchSupport" ;; FIXME: Remove when <rdar://problem/13011633> is fixed.
497         "com.apple.ServicesMenu.Services" ;; Needed for NSAttributedString <rdar://problem/10844321>
498         "com.apple.ViewBridge" ;; Needed for Input elements.
499         "com.apple.WebFoundation"
500         "com.apple.avfoundation"
501         "com.apple.avfoundation.frecents" ;; <rdar://problem/33137029>
502         "com.apple.avfoundation.videoperformancehud" ;; <rdar://problem/31594568>
503         "com.apple.coremedia"
504         "com.apple.crypto"
505         "com.apple.driver.AppleBluetoothMultitouch.mouse"
506         "com.apple.driver.AppleBluetoothMultitouch.trackpad"
507         "com.apple.driver.AppleHIDMouse"
508         "com.apple.lookup.shared"
509         "com.apple.mediaaccessibility" ;; Needed for custom caption styles
510         "com.apple.networkConnect"
511         "com.apple.speech.voice.prefs"
512         "com.apple.systemsound"
513         "com.apple.universalaccess"
514         "edu.mit.Kerberos"
515         "pbs" ;; Needed for NSAttributedString <rdar://problem/10844321>
516 ))
517
518 ; (Temporary) backward compatibility with non-CFPreferences readers.
519 (allow file-read*
520     (literal "/Library/Preferences/com.apple.ViewBridge.plist"))
521
522 ; FIXME: This is needed for some security framework calls (that use non-CFPreferences readers)
523 (allow file-read-data
524     (literal "/Library/Preferences/com.apple.security.plist")
525     (home-subpath "/Library/Preferences/com.apple.security.plist"))
526
527 ;; On-disk WebKit2 framework location, to account for debug installations outside of /System/Library/Frameworks,
528 ;; and to allow issuing extensions.
529 (allow-read-directory-and-issue-read-extensions (param "WEBKIT2_FRAMEWORK_DIR"))
530
531 ;; Allow issuing extensions to system libraries that the Network process can already read.
532 ;; This is to avoid warnings attempting to create extensions for these resources.
533 (allow-read-directory-and-issue-read-extensions "/System/Library/PrivateFrameworks/WebInspectorUI.framework")
534
535 ;; Sandbox extensions
536 (define (apply-read-and-issue-extension op path-filter)
537     (op file-read* path-filter)
538     (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") path-filter)))
539 (define (apply-write-and-issue-extension op path-filter)
540     (op file-write* path-filter)
541     (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") path-filter)))
542 (define (read-only-and-issue-extensions path-filter)
543     (apply-read-and-issue-extension allow path-filter))
544 (define (read-write-and-issue-extensions path-filter)
545     (apply-read-and-issue-extension allow path-filter)
546     (apply-write-and-issue-extension allow path-filter))
547 (read-only-and-issue-extensions (extension "com.apple.app-sandbox.read"))
548 (read-write-and-issue-extensions (extension "com.apple.app-sandbox.read-write"))
549 (allow mach-lookup (extension "com.apple.app-sandbox.mach")) ;; FIXME: Should be removed when <rdar://problem/13066206> is fixed.
550
551 ;; Allow the OpenGL Profiler to attach.
552 (if (defined? 'mach-register)
553     (allow mach-register (global-name-regex #"^_oglprof_attach_<[0-9]+>$")))
554
555 (if (positive? (string-length (param "DARWIN_USER_CACHE_DIR")))
556     (allow-read-write-directory-and-issue-read-write-extensions (param "DARWIN_USER_CACHE_DIR")))
557
558 (if (positive? (string-length (param "DARWIN_USER_TEMP_DIR")))
559     (allow-read-write-directory-and-issue-read-write-extensions (param "DARWIN_USER_TEMP_DIR")))
560
561 ;; IOKit user clients
562 (allow iokit-open
563     (iokit-user-client-class "AppleMultitouchDeviceUserClient")
564     (iokit-user-client-class "AppleUpstreamUserClient")
565     (iokit-user-client-class "IOHIDParamUserClient")
566     (iokit-user-client-class "RootDomainUserClient")
567     (iokit-user-client-class "IOAudioControlUserClient")
568     (iokit-user-client-class "IOAudioEngineUserClient")
569     ;; Following is needed due to <rdar://problem/10427451> && <rdar://problem/10808817>
570     (iokit-user-client-class "AudioAUUC"))
571
572 ;; cookied.
573 ;; FIXME: Update for <rdar://problem/13642852>.
574 (allow ipc-posix-shm-read-data
575     (ipc-posix-name "FNetwork.defaultStorageSession")
576     (ipc-posix-name-regex #"\.PrivateBrowsing-")
577     (ipc-posix-name-regex #"^WebKit Test-"))
578
579 ;; ColorSync
580 (allow ipc-posix-shm*
581     (ipc-posix-name "com.apple.ColorSync.Gen.lock")
582     (ipc-posix-name "com.apple.ColorSync.Disp.lock")
583     (ipc-posix-name "com.apple.ColorSync.Gray2.2")
584     (ipc-posix-name "com.apple.ColorSync.sRGB")
585     (ipc-posix-name "com.apple.ColorSync.GenGray")
586     (ipc-posix-name "com.apple.ColorSync.GenRGB"))
587
588 ;; Audio
589 (allow ipc-posix-shm-read* ipc-posix-shm-write-data
590     (ipc-posix-name-regex #"^AudioIO"))
591
592 ;; Remote Web Inspector
593 (allow mach-lookup
594        (global-name "com.apple.webinspector"))
595
596 (allow mach-lookup
597     (global-name "com.apple.FileCoordination"))
598
599 ;; Various services required by AppKit and other frameworks
600 (allow mach-lookup
601 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
602        (global-name "com.apple.FontObjectsServer")
603 #endif
604        (global-name "com.apple.PowerManagement.control")
605        (global-name "com.apple.SystemConfiguration.configd")
606 #if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
607        (global-name "com.apple.analyticsd")
608        (global-name "com.apple.audio.AudioComponentRegistrar")
609 #endif
610        (global-name "com.apple.assertiond.processassertionconnection")
611        (global-name "com.apple.audio.SystemSoundServer-OSX")
612        (global-name "com.apple.audio.audiohald")
613        (global-name "com.apple.awdd")
614        (global-name "com.apple.cfprefsd.agent")
615        (global-name "com.apple.cfprefsd.daemon")
616        (global-name "com.apple.cmio.registerassistantservice") ;; Needed by CoreMedia for plugin drivers
617        (global-name "com.apple.cookied")
618        (global-name "com.apple.coreservices.launchservicesd")
619        (global-name "com.apple.diagnosticd")
620        (global-name "com.apple.fonts")
621        (global-name "com.apple.iconservices")
622        (global-name "com.apple.iconservices.store")
623        (global-name "com.apple.mediaremoted.xpc")
624        (global-name "com.apple.logd")
625        (global-name "com.apple.logd.events")
626        (global-name "com.apple.lsd.mapdb")
627        (global-name "com.apple.lskdd") ;; <rdar://problem/49123855>
628        (global-name "com.apple.mobileassetd")
629        (global-name "com.apple.powerlog.plxpclogger.xpc")
630        (global-name "com.apple.system.logger")
631        (global-name "com.apple.tccd")
632        (global-name "com.apple.tccd.system")
633        (global-name "com.apple.trustd.agent")
634 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
635        (global-name "com.apple.CARenderServer") ; Needed for [CAContext remoteContextWithOptions]
636 #else
637        (global-name "com.apple.windowserver.active")
638 #endif
639 )
640
641 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 || PLATFORM(IOSMAC)
642 ;; <rdar://problem/47268166>
643 (allow mach-lookup (xpc-service-name "com.apple.MTLCompilerService"))
644 #endif
645
646 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
647 (deny mach-lookup (with no-log)
648     (global-name "com.apple.ViewBridgeAuxiliary")
649     (global-name "com.apple.windowserver.active"))
650 #endif
651
652
653 ;; Needed to support encrypted media playback <rdar://problem/40038478>
654 (allow mach-lookup
655     (global-name "com.apple.SecurityServer")
656     (global-name "com.apple.ocspd"))
657
658 (allow file-read* file-write* (subpath "/private/var/db/mds/system")) ;; FIXME: This should be removed when <rdar://problem/9538414> is fixed.
659
660 (allow file-read*
661        (subpath "/private/var/db/mds")
662        (literal "/private/var/db/DetachedSignatures"))
663
664 (allow ipc-posix-shm-read* ipc-posix-shm-write-data ipc-posix-shm-write-create
665        (ipc-posix-name "com.apple.AppleDatabaseChanged"))
666
667 ;; CoreFoundation. We don't import com.apple.corefoundation.sb, because it allows unnecessary access to pasteboard.
668 (allow mach-lookup
669     (global-name-regex #"^com.apple.distributed_notifications")
670 #if !HAVE(CSCHECKFIXDISABLE)
671     (global-name "com.apple.CoreServices.coreservicesd")
672 #endif
673 )
674
675 (allow file-read-data
676     (literal "/dev/autofs_nowait")) ; Used by CF to circumvent automount triggers
677 (allow ipc-posix-shm
678     (ipc-posix-name-regex #"^CFPBS:")) ; <rdar://problem/13757475>
679 (allow system-fsctl (fsctl-command (_IO "h" 47)))
680
681 ;; Graphics
682 (system-graphics)
683
684 ;; Networking
685 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
686 (system-network)
687 #endif
688 (allow network-outbound
689        ;; Local mDNSResponder for DNS, arbitrary outbound TCP
690        ;; Note: This is needed for some media playback features. <rdar://problem/38191574>
691        ;; Remove this permission when <rdar://problem/38240572> is fixed.
692        (literal "/private/var/run/mDNSResponder")
693        ;; ObjC map_images needs to send logging data to syslog. <rdar://problem/39778918>
694        (literal "/private/var/run/syslog")
695        (remote tcp))
696
697 #if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
698 ;; CFNetwork
699 (allow file-read-data (path "/private/var/db/nsurlstoraged/dafsaData.bin"))
700 #endif
701
702 ;; Network Extensions / VPN helper.
703 (allow mach-lookup
704     (global-name "com.apple.nehelper")
705     (global-name "com.apple.nesessionmanager.content-filter")) ;; <rdar://problem/48442387>
706
707 #if PLATFORM(MAC)
708 ;; FIXME should be removed when <rdar://problem/9347205> + related radar in Safari is fixed
709 (allow mach-lookup
710        (global-name "com.apple.system.logger")
711        (global-name "com.apple.system.notification_center"))
712 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
713 (allow network-outbound
714        (remote udp))
715 #endif
716 #endif
717
718 (if (defined? 'vnode-type)
719         (deny file-write-create (vnode-type SYMLINK)))
720
721 ;; Reserve a namespace for additional protected extended attributes.
722 (deny file-read-xattr file-write-xattr (xattr-regex #"^com\.apple\.security\.private\."))
723
724 (deny file-read* file-write* (with no-log)
725        ;; FIXME: Should be removed after <rdar://problem/10463881> is fixed.
726        (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2")
727        (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2-journal"))
728
729 ;; Deny access needed for unnecessary NSApplication initialization.
730 ;; FIXME: This can be removed once <rdar://problem/13011633> is fixed.
731 (deny file-read* (with no-log)
732        (subpath "/Library/InputManagers")
733        (home-subpath "/Library/InputManagers"))
734 (deny user-preference-read (with no-log)
735     (preference-domain "com.apple.speech.recognition.AppleSpeechRecognition.prefs"))
736 (deny mach-lookup (with no-log)
737        (global-name "com.apple.coreservices.appleevents")
738        (global-name "com.apple.pasteboard.1")
739        (global-name "com.apple.speech.recognitionserver"))
740 #if PLATFORM(MAC)
741 ;; Also part of unnecessary NSApplication initialization, but we can't block access to these yet, see <rdar://problem/13869765>.
742 (allow file-read*
743        (subpath "/Library/Components")
744        (subpath "/Library/Keyboard Layouts")
745        (subpath "/Library/Input Methods")
746        (home-subpath "/Library/Components")
747        (home-subpath "/Library/Keyboard Layouts")
748        (home-subpath "/Library/Input Methods"))
749 #endif
750
751 ;; AirPlay
752 (allow mach-lookup
753     (global-name "com.apple.coremedia.endpoint.xpc")
754     (global-name "com.apple.coremedia.endpointstream.xpc")
755     (global-name "com.apple.coremedia.endpointplaybacksession.xpc")
756     ; <rdar://problem/35509194>
757     (global-name "com.apple.coremedia.endpointremotecontrolsession.xpc")
758 #if !PLATFORM(MAC) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
759     (global-name "com.apple.coremedia.routediscoverer.xpc")
760     (global-name "com.apple.coremedia.routingcontext.xpc")
761     (global-name "com.apple.coremedia.volumecontroller.xpc")
762 #endif
763 )
764
765 ;; Data Detectors
766 (allow file-read* (subpath "/private/var/db/datadetectors/sys"))
767
768 #if PLATFORM(MAC)
769 ;; Media capture, utilities
770 (if (not (defined? 'sbpl-filter?))
771   (define (sbpl-filter? x)
772       (and (list? x)
773            (eq? (car x) 'filter))))
774
775 (macro (with-filter form)
776    (let* ((ps (cdr form))
777           (extra-filter (car ps))
778           (rules (cdr ps)))
779     `(letrec
780         ((collect
781              (lambda (l filters non-filters)
782                  (if (null? l)
783                      (list filters non-filters)
784                      (let* 
785                          ((x (car l))
786                           (rest (cdr l)))
787                          (if (sbpl-filter? x)
788                              (collect rest (cons x filters) non-filters)
789                              (collect rest filters (cons x non-filters)))))))
790          (inject-filter
791              (lambda args
792                  (let* ((collected (collect args '() '()))
793                         (filters (car collected))
794                         (non-filters (cadr collected)))
795                  (if (null? filters)
796                      (cons ,extra-filter non-filters)
797                      (cons (require-all (apply require-any filters) ,extra-filter) non-filters)))))
798          (orig-allow allow)
799          (orig-deny deny)
800          (wrapper
801              (lambda (action)
802                  (lambda args (apply action (apply inject-filter args))))))
803         (set! allow (wrapper orig-allow))
804         (set! deny (wrapper orig-deny))
805         ,@rules
806         (set! deny orig-deny)
807         (set! allow orig-allow))))
808
809 (define (home-library-preferences-regex home-library-preferences-relative-regex)
810     (regex (string-append "^" (regex-quote (param "HOME_LIBRARY_PREFERENCES_DIR")) home-library-preferences-relative-regex)))
811
812 (define (home-library-preferences-literal home-library-preferences-relative-literal)
813     (literal (string-append (param "HOME_LIBRARY_PREFERENCES_DIR") home-library-preferences-relative-literal)))
814
815 (define (shared-preferences-read . domains)
816   (for-each (lambda (domain)
817               (begin
818                 (if (defined? `user-preference-read)
819                     (allow user-preference-read (preference-domain domain)))
820                 ; (Temporary) backward compatibility with non-CFPreferences readers.
821                 (allow file-read*
822                        (literal (string-append "/Library/Preferences/" domain ".plist"))
823                        (home-library-preferences-literal (string-append "/" domain ".plist"))
824                        (home-library-preferences-regex (string-append #"/ByHost/" (regex-quote domain) #"\..*\.plist$")))))
825             domains))
826
827 ;; Media capture, microphone access
828 (with-filter (extension "com.apple.webkit.microphone")
829     (allow device-microphone))
830
831 ;; Media capture, camera access
832 (with-filter (extension "com.apple.webkit.camera")
833     (shared-preferences-read "com.apple.coremedia")
834     (allow file-read* (subpath "/Library/CoreMediaIO/Plug-Ins/DAL"))
835     (allow mach-lookup (extension "com.apple.app-sandbox.mach"))
836     (allow mach-lookup
837         (global-name "com.apple.cmio.AppleCameraAssistant")
838         ;; Apple DAL assistants
839         (global-name "com.apple.cmio.VDCAssistant")
840         (global-name "com.apple.cmio.AVCAssistant")
841         (global-name "com.apple.cmio.IIDCVideoAssistant")
842         ;; QuickTimeIIDCDigitizer assistant
843         (global-name "com.apple.IIDCAssistant"))
844     (allow iokit-open
845         ;; QuickTimeUSBVDCDigitizer
846         (iokit-user-client-class "IOUSBDeviceUserClientV2")
847         (iokit-user-client-class "IOUSBInterfaceUserClientV2"))
848     (allow device-camera))
849 #endif // PLATFORM(MAC)
850
851 (when (defined? 'syscall-unix)
852     (deny syscall-unix (with send-signal SIGKILL))
853     (allow syscall-unix
854         (syscall-number SYS_exit)
855         (syscall-number SYS_read)
856         (syscall-number SYS_write)
857         (syscall-number SYS_open)
858         (syscall-number SYS_close)
859         (syscall-number SYS_unlink)
860         (syscall-number SYS_chmod)
861         (syscall-number SYS_getuid)
862         (syscall-number SYS_geteuid)
863         (syscall-number SYS_recvfrom)
864         (syscall-number SYS_getpeername)
865         (syscall-number SYS_access)
866         (syscall-number SYS_dup)
867         (syscall-number SYS_pipe)
868         (syscall-number SYS_getegid)
869         (syscall-number SYS_getgid)
870         (syscall-number SYS_sigprocmask)
871         (syscall-number SYS_sigaltstack)
872         (syscall-number SYS_ioctl)
873         (syscall-number SYS_readlink)
874         (syscall-number SYS_umask)
875         (syscall-number SYS_msync)
876         (syscall-number SYS_munmap)
877         (syscall-number SYS_mprotect)
878         (syscall-number SYS_madvise)
879         (syscall-number SYS_fcntl)
880         (syscall-number SYS_select)
881         (syscall-number SYS_fsync)
882         (syscall-number SYS_setpriority)
883         (syscall-number SYS_socket)
884         (syscall-number SYS_connect)
885         (syscall-number SYS_setsockopt)
886         (syscall-number SYS_gettimeofday)
887         (syscall-number SYS_getrusage)
888         (syscall-number SYS_getsockopt)
889         (syscall-number SYS_writev)
890         (syscall-number SYS_fchmod)
891         (syscall-number SYS_rename)
892         (syscall-number SYS_flock)
893         (syscall-number SYS_sendto)
894         (syscall-number SYS_shutdown)
895         (syscall-number SYS_socketpair)
896         (syscall-number SYS_mkdir)
897         (syscall-number SYS_rmdir)
898         (syscall-number SYS_pread)
899         (syscall-number SYS_pwrite)
900         (syscall-number SYS_csops)
901         (syscall-number SYS_csops_audittoken)
902         (syscall-number SYS_kdebug_trace64)
903         (syscall-number SYS_kdebug_trace)
904         (syscall-number SYS_sigreturn)
905         (syscall-number SYS_pathconf)
906         (syscall-number SYS_getrlimit)
907         (syscall-number SYS_setrlimit)
908         (syscall-number SYS_mmap)
909         (syscall-number SYS_lseek)
910         (syscall-number SYS_ftruncate)
911         (syscall-number SYS_sysctl)
912         (syscall-number SYS_mlock)
913         (syscall-number SYS_munlock)
914         (syscall-number SYS_getattrlist)
915         (syscall-number SYS_getxattr)
916         (syscall-number SYS_fgetxattr)
917         (syscall-number SYS_listxattr)
918         (syscall-number SYS_shm_open)
919         (syscall-number SYS_sem_wait)
920         (syscall-number SYS_sem_post)
921         (syscall-number SYS_sysctlbyname)
922         (syscall-number SYS_psynch_mutexwait)
923         (syscall-number SYS_psynch_mutexdrop)
924         (syscall-number SYS_psynch_cvbroad)
925         (syscall-number SYS_psynch_cvsignal)
926         (syscall-number SYS_psynch_cvwait)
927         (syscall-number SYS_psynch_rw_wrlock)
928         (syscall-number SYS_psynch_rw_unlock)
929         (syscall-number SYS_psynch_cvclrprepost)
930         (syscall-number SYS_process_policy)
931         (syscall-number SYS_issetugid)
932         (syscall-number SYS___pthread_kill)
933         (syscall-number SYS___pthread_sigmask)
934         (syscall-number SYS___disable_threadsignal)
935         (syscall-number SYS___semwait_signal)
936         (syscall-number SYS_proc_info)
937         (syscall-number SYS_stat64)
938         (syscall-number SYS_fstat64)
939         (syscall-number SYS_lstat64)
940         (syscall-number SYS_getdirentries64)
941         (syscall-number SYS_statfs64)
942         (syscall-number SYS_fstatfs64)
943         (syscall-number SYS_getfsstat64)
944         (syscall-number SYS_getaudit_addr)
945         (syscall-number SYS_bsdthread_create)
946         (syscall-number SYS_bsdthread_terminate)
947         (syscall-number SYS_workq_kernreturn)
948         (syscall-number SYS_thread_selfid)
949         (syscall-number SYS_kevent_qos)
950         (syscall-number SYS_kevent_id)
951         (syscall-number SYS___mac_syscall)
952         (syscall-number SYS_read_nocancel)
953         (syscall-number SYS_write_nocancel)
954         (syscall-number SYS_open_nocancel)
955         (syscall-number SYS_close_nocancel)
956         (syscall-number SYS_sendmsg_nocancel)
957         (syscall-number SYS_recvfrom_nocancel)
958         (syscall-number SYS_fcntl_nocancel)
959         (syscall-number SYS_select_nocancel)
960         (syscall-number SYS_connect_nocancel)
961         (syscall-number SYS_sendto_nocancel)
962         (syscall-number SYS_fsgetpath)
963         (syscall-number SYS_fileport_makeport)
964         (syscall-number SYS_guarded_open_np)
965         (syscall-number SYS_guarded_close_np)
966         (syscall-number SYS_change_fdguard_np)
967         (syscall-number SYS_proc_rlimit_control)
968         (syscall-number SYS_connectx)
969         (syscall-number SYS_getattrlistbulk)
970         (syscall-number SYS_openat)
971         (syscall-number SYS_openat_nocancel)
972         (syscall-number SYS_fstatat64)
973         (syscall-number SYS_mkdirat)
974         (syscall-number SYS_bsdthread_ctl)
975         (syscall-number SYS_csrctl)
976         (syscall-number SYS_guarded_pwrite_np)
977         (syscall-number SYS_getentropy)
978         (syscall-number SYS_necp_open)
979         (syscall-number SYS_necp_client_action)
980         (syscall-number SYS_ulock_wait)
981         (syscall-number SYS_ulock_wake)
982         (syscall-number SYS_work_interval_ctl)
983         (syscall-number SYS_kdebug_typefilter)
984         (syscall-number SYS_gettid) ;; Needed for base system, see <rdar://problem/48651255>
985         (syscall-number SYS_memorystatus_control) ;; Needed for memory measurement infrastructure, see <rdar://problem/48647263>
986         (syscall-number SYS_kdebug_trace_string) ;; Needed for performance sampling, see <rdar://problem/48829655>.
987         (syscall-number SYS_psynch_rw_rdlock) ;; <rdar://problem/49060359>
988         (syscall-number SYS_terminate_with_payload) ;; <rdar://problem/50026580>
989         (syscall-number SYS_quotactl) ;; <rdar://problem/49945031>
990         (syscall-number SYS_stat64_extended) ;; <rdar://problem/50473330>
991         (syscall-number SYS_lstat64_extended)
992         (syscall-number SYS_iopolicysys)
993         (syscall-number SYS_workq_open)
994         (syscall-number SYS_getgroups)
995     )
996 )
997