Changeset 77610 in webkit
- Timestamp:
- Feb 3, 2011 11:00:58 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r77607 r77610 1 2011-02-03 Ivan Krstić <ike@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 Make WebProcess pass explicit homedir parameter to the sandbox 6 <rdar://problem/8405760> 7 <https://webkit.org/b/53558> 8 9 * WebProcess/com.apple.WebProcess.sb: 10 * WebProcess/mac/WebProcessMac.mm: 11 (WebKit::initializeSandbox): 12 1 13 2011-02-03 James Kozianski <koz@chromium.org> 2 14 -
trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb
r77409 r77610 16 16 ;; Plugins 17 17 (subpath "/Library/Internet Plug-Ins") 18 (subpath (string-append (param " _HOME") "/Library/Internet Plug-Ins"))18 (subpath (string-append (param "HOME_DIR") "/Library/Internet Plug-Ins")) 19 19 20 20 ;; System and user preferences 21 21 (literal "/Library/Preferences/.GlobalPreferences.plist") 22 22 (literal "/Library/Preferences/com.apple.security.plist") 23 (literal (string-append (param " _HOME") "/Library/Preferences/.GlobalPreferences.plist"))24 (regex (string-append "^" (param " _HOME") "/Library/Preferences/ByHost/\.GlobalPreferences\."))25 (literal (string-append (param " _HOME") "/Library/Preferences/com.apple.ATS.plist"))26 (literal (string-append (param " _HOME") "/Library/Preferences/com.apple.HIToolbox.plist"))27 (literal (string-append (param " _HOME") "/Library/Preferences/com.apple.LaunchServices.plist"))28 (literal (string-append (param " _HOME") "/Library/Preferences/com.apple.WebFoundation.plist"))29 (literal (string-append (param " _HOME") "/Library/Preferences/com.apple.security.plist"))30 (literal (string-append (param " _HOME") "/Library/Preferences/com.apple.security.revocation.plist"))31 (subpath (string-append (param " _HOME") "/Library/Keychains"))23 (literal (string-append (param "HOME_DIR") "/Library/Preferences/.GlobalPreferences.plist")) 24 (regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/ByHost/\.GlobalPreferences\.")) 25 (literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.ATS.plist")) 26 (literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.HIToolbox.plist")) 27 (literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.LaunchServices.plist")) 28 (literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.WebFoundation.plist")) 29 (literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.security.plist")) 30 (literal (string-append (param "HOME_DIR") "/Library/Preferences/com.apple.security.revocation.plist")) 31 (subpath (string-append (param "HOME_DIR") "/Library/Keychains")) 32 32 33 33 ;; On-disk WebKit2 framework location, to account for debug installations … … 46 46 ;; Writable preferences and temporary files 47 47 (allow file* 48 (subpath (string-append (param " _HOME") "/Library/Caches/com.apple.WebProcess"))49 (regex (string-append "^" (param " _HOME") "/Library/Preferences/ByHost/com\.apple\.HIToolbox\."))50 (regex (string-append "^" (param " _HOME") "/Library/Preferences/com\.apple\.WebProcess\."))48 (subpath (string-append (param "HOME_DIR") "/Library/Caches/com.apple.WebProcess")) 49 (regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/ByHost/com\.apple\.HIToolbox\.")) 50 (regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/com\.apple\.WebProcess\.")) 51 51 ) 52 52 … … 112 112 ;; FIXME: These rules are required until plug-ins are moved out of the web process. 113 113 (allow file-read* 114 (regex (string-append "^" (param " _HOME") "/Library/Preferences/ByHost/com\.apple\.ist\."))115 (literal (string-append (param " _HOME") "/Library/Preferences/edu.mit.Kerberos"))114 (regex (string-append "^" (param "HOME_DIR") "/Library/Preferences/ByHost/com\.apple\.ist\.")) 115 (literal (string-append (param "HOME_DIR") "/Library/Preferences/edu.mit.Kerberos")) 116 116 (literal "/Library/Preferences/edu.mit.Kerberos") 117 117 ) -
trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm
r76991 r77610 122 122 char tmpPath[PATH_MAX]; 123 123 char tmpRealPath[PATH_MAX]; 124 char homeRealPath[PATH_MAX]; 124 125 char cachePath[PATH_MAX]; 125 126 char cacheRealPath[PATH_MAX]; 126 127 const char* frameworkPath = [[[[NSBundle bundleForClass:NSClassFromString(@"WKView")] bundlePath] stringByDeletingLastPathComponent] UTF8String]; 127 128 const char* profilePath = [[[NSBundle mainBundle] pathForResource:@"com.apple.WebProcess" ofType:@"sb"] UTF8String]; 129 130 if (!realpath([NSHomeDirectory() UTF8String], homeRealPath)) { 131 fprintf(stderr, "WebProcess: couldn't determine home directory when initializing sandbox"); 132 exit(EX_CONFIG); 133 } 128 134 129 135 if (confstr(_CS_DARWIN_USER_TEMP_DIR, tmpPath, PATH_MAX) <= 0 || !realpath(tmpPath, tmpRealPath)) … … 134 140 135 141 const char* const sandboxParam[] = { 142 "HOME_DIR", (const char*)homeRealPath, 136 143 "WEBKIT2_FRAMEWORK_DIR", frameworkPath, 137 144 "DARWIN_USER_TEMP_DIR", (const char*)tmpRealPath,
Note: See TracChangeset
for help on using the changeset viewer.