Changeset 85409 in webkit
- Timestamp:
- May 1, 2011 12:45:22 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85408 r85409 1 2011-05-01 Ivan Krstić <ike@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 Simplify WebProcess sandbox with homedir-relative path filters. 6 https://bugs.webkit.org/show_bug.cgi?id=59872 7 8 * WebProcess/com.apple.WebProcess.sb: 9 1 10 2011-05-01 Ivan Krstić <ike@apple.com> 2 11 -
trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb
r85408 r85409 8 8 ;; Distributed notifications, local pasteboard client 9 9 (corefoundation) 10 11 ;; Utility functions for home directory relative path filters 12 (define (home-regex home-relative-regex) 13 (regex (string-append "^" (regex-quote (param "HOME_DIR")) home-relative-regex))) 14 15 (define (home-subpath home-relative-subpath) 16 (subpath (string-append (param "HOME_DIR") home-relative-subpath))) 17 18 (define (home-literal home-relative-literal) 19 (literal (string-append (param "HOME_DIR") home-relative-literal))) 10 20 11 21 ;; Read-only preferences and data … … 22 32 ;; Plugins 23 33 (subpath "/Library/Internet Plug-Ins") 24 ( subpath (string-append (param "HOME_DIR") "/Library/Internet Plug-Ins"))34 (home-subpath "/Library/Internet Plug-Ins") 25 35 26 36 ;; System and user preferences … … 31 41 (literal "/Library/Preferences/com.apple.security.revocation.plist") 32 42 (regex #"^/Library/Managed Preferences/[^/]+/com\.apple\.networkConnect\.plist$") 33 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/.GlobalPreferences.plist"))34 ( regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/ByHost/\.GlobalPreferences\."))35 ( regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/ByHost/com\.apple\.networkConnect\."))36 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.ATS.plist"))37 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.HIToolbox.plist"))38 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.LaunchServices.plist"))39 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.WebFoundation.plist"))40 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.security.plist"))41 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.security.revocation.plist"))42 ( literal (string-append (param "HOME_DIR") "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain"))43 ( regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/com\.apple\.driver\.(AppleBluetoothMultitouch\.mouse|AppleBluetoothMultitouch\.trackpad|AppleHIDMouse)\.plist$"))43 (home-literal "/Library/Preferences/.GlobalPreferences.plist") 44 (home-regex "/Library/Preferences/ByHost/\.GlobalPreferences\.") 45 (home-regex "/Library/Preferences/ByHost/com\.apple\.networkConnect\.") 46 (home-literal "/Library/Preferences/com.apple.ATS.plist") 47 (home-literal "/Library/Preferences/com.apple.HIToolbox.plist") 48 (home-literal "/Library/Preferences/com.apple.LaunchServices.plist") 49 (home-literal "/Library/Preferences/com.apple.WebFoundation.plist") 50 (home-literal "/Library/Preferences/com.apple.security.plist") 51 (home-literal "/Library/Preferences/com.apple.security.revocation.plist") 52 (home-literal "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain") 53 (home-regex "/Library/Preferences/com\.apple\.driver\.(AppleBluetoothMultitouch\.mouse|AppleBluetoothMultitouch\.trackpad|AppleHIDMouse)\.plist$") 44 54 45 55 ;; On-disk WebKit2 framework location, to account for debug installations … … 48 58 49 59 ;; FIXME: This should be removed when <rdar://problem/8957845> is fixed. 50 ( subpath (string-append (param "HOME_DIR") "/Library/Fonts"))60 (home-subpath "/Library/Fonts") 51 61 52 62 ;; FIXME: These should be removed when <rdar://problem/9217757> is fixed. 53 ( subpath (string-append (param "HOME_DIR") "/Library/Audio/Plug-Ins/Components"))54 ( subpath (string-append (param "HOME_DIR") "/Library/Preferences/QuickTime Preferences"))55 ( literal (string-append (param "HOME_DIR") "/Library/Caches/com.apple.coreaudio.components.plist"))63 (home-subpath "/Library/Audio/Plug-Ins/Components") 64 (home-subpath "/Library/Preferences/QuickTime Preferences") 65 (home-literal "/Library/Caches/com.apple.coreaudio.components.plist") 56 66 (subpath "/Library/Audio/Plug-Ins/Components") 57 67 (subpath "/Library/Audio/Plug-Ins/HAL") … … 60 70 61 71 ;; FIXME: This should be removed when <rdar://problem/9237619> is fixed. 62 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.universalaccess.plist"))72 (home-literal "/Library/Preferences/com.apple.universalaccess.plist") 63 73 64 74 ;; FIXME: This should be removed when <rdar://problem/9276253> is fixed. 65 ( subpath (string-append (param "HOME_DIR") "/Library/Keyboard Layouts"))75 (home-subpath "/Library/Keyboard Layouts") 66 76 67 77 ;; FIXME: This should be removed when <rdar://problem/9276268> is fixed. 68 ( subpath (string-append (param "HOME_DIR") "/Library/Input Methods"))78 (home-subpath "/Library/Input Methods") 69 79 70 80 ;; FIXME: This should be removed when <rdar://problem/9276430> is fixed. 71 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2"))81 (home-literal "/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2") 72 82 73 ( subpath (string-append (param "HOME_DIR") "/Library/Dictionaries")))83 (home-subpath "/Library/Dictionaries")) 74 84 75 85 ;; This should be updated when <rdar://problem/9355830> is fixed. … … 83 93 ;; Writable preferences and temporary files 84 94 (allow file* 85 ( subpath (string-append (param "HOME_DIR") "/Library/Caches/com.apple.WebProcess"))86 ( regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/ByHost/com\.apple\.HIToolbox\."))87 ( regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/com\.apple\.WebProcess\."))88 ( subpath (string-append (param "HOME_DIR") "/Library/Keychains")))95 (home-subpath "/Library/Caches/com.apple.WebProcess") 96 (home-regex "/Library/Preferences/ByHost/com\.apple\.HIToolbox\.") 97 (home-regex "/Library/Preferences/com\.apple\.WebProcess\.") 98 (home-subpath "/Library/Keychains")) 89 99 90 100 ;; Darwin temporary files and Security mds caches, if present … … 166 176 (allow network-outbound (regex #"^/private/tmp/launch-[^/]+/Render")) 167 177 (allow file-read* 168 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.Safari.RSS.plist"))169 ( literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.Syndication.plist")))178 (home-literal "/Library/Preferences/com.apple.Safari.RSS.plist") 179 (home-literal "/Library/Preferences/com.apple.Syndication.plist")) 170 180 171 181 ;; Mute violations 172 182 (deny file-write* 173 ( literal (string-append (param "HOME_DIR") "/Library/Caches/com.apple.coreaudio.components.plist"))183 (home-literal "/Library/Caches/com.apple.coreaudio.components.plist") 174 184 (with no-log)) 175 185
Note: See TracChangeset
for help on using the changeset viewer.