File: com.apple.WebKit.PluginProcess.sb.in

package info (click to toggle)
qtwebkit 2.3.4.dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 290,116 kB
  • ctags: 272,544
  • sloc: cpp: 1,417,496; python: 85,048; ansic: 39,353; perl: 38,858; ruby: 10,313; objc: 9,505; xml: 8,679; asm: 3,864; yacc: 2,458; sh: 1,237; lex: 813; makefile: 592; java: 228; php: 79
file content (194 lines) | stat: -rw-r--r-- 9,103 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
(version 1)
(deny default (with partial-symbolication))
(allow ipc-posix-shm system-audit system-socket file-read-metadata)

(import "system.sb")

;; Utility functions for home directory relative path filters
(define (home-regex home-relative-regex)
  (regex (string-append "^" (regex-quote (param "HOME_DIR")) home-relative-regex)))

(define (home-subpath home-relative-subpath)
  (subpath (string-append (param "HOME_DIR") home-relative-subpath)))

(define (home-literal home-relative-literal)
  (literal (string-append (param "HOME_DIR") home-relative-literal)))

;; Read-only preferences and data
(allow file-read*
       ;; Basic system paths
       (subpath "/Library/Frameworks")
       (subpath "/private/var/db/mds")

       ;; System and user preferences
       (literal "/Library/Preferences/.GlobalPreferences.plist")
       (literal "/Library/Preferences/com.apple.Bluetooth.plist")
       (literal "/Library/Preferences/com.apple.QuickTime.plist")
       (regex #"^/Library/Preferences/com\.apple\.security")
       (home-literal "/.CFUserTextEncoding")
       (home-subpath "/Library/Audio")
       (home-subpath "/Library/ColorPickers")
       (home-subpath "/Library/ColorSync")
       (home-subpath "/Library/Components")
       (home-subpath "/Library/Input Methods")
       (home-subpath "/Library/KeyBindings")
       (home-subpath "/Library/Keyboard Layouts")
       (home-subpath "/Library/Fonts")
       (home-subpath "/Library/PDF Services")
       (home-literal "/Library/Preferences/.GlobalPreferences.plist")
       (home-regex #"/Library/Preferences/ByHost/\.GlobalPreferences\.")
       (home-regex #"/Library/Preferences/ByHost/com\.apple\.Bluetooth\.")
       (home-literal "/Library/Preferences/com.apple.ATS.plist")
       (home-literal "/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.mouse.plist")
       (home-literal "/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist")
       (home-literal "/Library/Preferences/com.apple.driver.AppleHIDMouse.plist")
       (home-literal "/Library/Preferences/com.apple.inputmethodkit.plist")
       (home-literal "/Library/Preferences/com.apple.iWork.Pages.plist")
       (home-literal "/Library/Preferences/com.apple.LaunchServices.plist")
       (home-literal "/Library/Preferences/com.apple.MultitouchSupport.plist")
       (home-literal "/Library/Preferences/com.apple.opengl.plist")
       (home-literal "/Library/Preferences/com.apple.security.plist")
       (home-literal "/Library/Preferences/com.apple.security_common.plist")
       (home-literal "/Library/Preferences/com.apple.speech.voice.prefs.plist")
       (home-literal "/Library/Preferences/com.apple.speech.synthesis.general.prefs.plist")
       (home-literal "/Library/Preferences/com.apple.systemsound.plist")
       (home-literal "/Library/Preferences/com.apple.universalaccess.plist")
       (home-literal "/Library/Preferences/com.apple.WebFoundation.plist")
       (home-literal "/Library/Preferences/com.nvidia.OpenGL.plist")
       (home-literal "/Library/Preferences/pbs.plist")
       (home-literal "/Library/Preferences/com.apple.ServicesMenu.Services.plist")
       (home-literal "/Library/Preferences/QuickTime Preferences")

       (home-literal "/Library/Caches/com.apple.coreaudio.components.plist")

       (subpath "/Library/Audio/Plug-Ins/Components")
       (home-subpath "/Library/Audio/Plug-Ins/Components")
       (subpath "/Library/Audio/Plug-Ins/HAL")
       (subpath "/Library/QuickTime")
       (home-subpath "/Library/QuickTime")
       (subpath "/Library/Video/Plug-Ins")

       (literal "/Library/Application Support/CrashReporter/SubmitDiagInfo.domains")

       (home-literal "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain")

       ;; FIXME: This should be removed when <rdar://problem/10479685> is fixed.
       (subpath "/Library/Keychains")
)

;; Read-write preferences and data
(allow file*
       (home-regex #"/Library/Preferences/com\.apple\.WebKit\.PluginProcess\.plist")

       (home-subpath "/Library/Caches/QuickTime")

       ;; FIXME: This should be removed when <rdar://problem/10479685> is fixed.
       (home-subpath "/Library/Keychains"))

;; IOKit user clients
(allow iokit-open
       (iokit-connection "IOAccelerator")
       (iokit-user-client-class "AGPMClient")
       (iokit-user-client-class "AppleGraphicsControlClient")
       (iokit-user-client-class "AppleSNBFBUserClient")
       (iokit-user-client-class "IOAccelerationUserClient")
       (iokit-user-client-class "IOAudioControlUserClient")
       (iokit-user-client-class "IOAudioEngineUserClient")
       (iokit-user-client-class "IOFramebufferSharedUserClient")
       (iokit-user-client-class "IOHIDParamUserClient")
       (iokit-user-client-class "IOSurfaceRootUserClient")
       (iokit-user-client-class "IOSurfaceSendRight")
       (iokit-user-client-class "RootDomainUserClient"))

;; Various services required by AppKit and other frameworks
(allow mach-lookup
       (global-name "com.apple.CoreServices.coreservicesd")
       (global-name "com.apple.DiskArbitration.diskarbitrationd")
       (global-name "com.apple.FileCoordination")
       (global-name "com.apple.FontObjectsServer")
       (global-name "com.apple.FontServer")
       (global-name "com.apple.ImageCaptureExtension2.presence")
       (global-name "com.apple.SecurityServer")
       (global-name "com.apple.SystemConfiguration.configd")
       (global-name "com.apple.SystemConfiguration.PPPController")
       (global-name "com.apple.SystemConfiguration.SCNetworkReachability")
       (global-name "com.apple.audio.VDCAssistant")
       (global-name "com.apple.audio.audiohald")
       (global-name "com.apple.audio.coreaudiod")
       (global-name "com.apple.cmio.VDCAssistant")
       (global-name "com.apple.cookied") ;; FIXME: <rdar://problem/10790768> Limit access to cookies.
       (global-name "com.apple.cvmsServ")
       (global-name "com.apple.networkd")
       (global-name "com.apple.ocspd")
       (global-name "com.apple.pasteboard.1")
       (global-name "com.apple.window_proxies")
       (global-name "com.apple.windowserver.active")
       (global-name "com.apple.cfnetwork.AuthBrokerAgent")
       (global-name "com.apple.PowerManagement.control")
       (global-name-regex #"_OpenStep$")
)

;; Networking
(allow system-socket (socket-domain AF_ROUTE))
(allow system-socket (require-all (socket-domain AF_SYSTEM) (socket-protocol 2))) ; SYSPROTO_CONTROL
(allow network-outbound
       ;; Kernel controls
       (control-name "com.apple.network.statistics")
       (control-name "com.apple.netsrc")

       ;; Local mDNSResponder for DNS, arbitrary outbound TCP
       (literal "/private/var/run/mDNSResponder")
       (remote tcp))

(allow mach-lookup
       (global-name "com.apple.tsm.uiserver")
       (local-name "com.apple.tsm.portname")
)

;; Open and Save panels
(define (apply-read-and-issue-extension op path-filter)
       (op file-read* path-filter)
       (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read") path-filter)))
(define (apply-write-and-issue-extension op path-filter)
       (op file-write* path-filter)
       (op file-issue-extension (require-all (extension-class "com.apple.app-sandbox.read-write") path-filter)))
(define (read-write-and-issue-extensions path-filter)
       (apply-read-and-issue-extension allow path-filter)
       (apply-write-and-issue-extension allow path-filter))
(allow qtn-user
       (extension "com.apple.app-sandbox.read-write"))
(read-write-and-issue-extensions (extension "com.apple.app-sandbox.read-write"))

;; Printing
(allow network-outbound (literal "/private/var/run/cupsd"))
(allow mach-lookup
       (global-name "com.apple.printuitool.agent")
       (global-name "com.apple.printtool.agent")
       (global-name "com.apple.printtool.daemon"))
(allow file-read*
       (home-literal "/.cups/lpoptions")
       (home-literal "/.cups/client.conf")
       (literal "/private/etc/cups/client.conf")
       (literal "/private/etc/cups/lpoptions")
       (subpath "/private/etc/cups/ppd")
       (subpath "/private/var/run/cupsd")
       (home-literal "/Library/Preferences/org.cups.PrintingPrefs.plist"))

;; Text Services Manager
(allow iokit-set-properties (iokit-property "CapsLockDelayOverride"))

;; Image Capture (used by print preview dialog)
(allow appleevent-send (appleevent-destination "com.apple.imagecaptureextension2"))

;; Silently block access to some files
(deny file-read* file-write* (with no-log)
       (home-regex #"/Library/Preferences/com\.apple\.internetconfigpriv\.plist")
       (home-regex #"/Library/Preferences/com\.apple\.internetconfig\.plist")

       ;; FIXME: Should be removed after <rdar://problem/9422957> is fixed.
       (home-literal "/Library/Caches/Cache.db")

       ;; FIXME: Should be removed after <rdar://problem/10463881> is fixed.
       (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2")
       (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2-journal"))