summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-11 08:41:42 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-11 08:41:42 +0000
commit3a8bdeaf675f4496a79b0adc034671cce3ffff00 (patch)
tree943b5bd1888ef91e650e0131eb37b2d2a22a0e14 /chrome/common
parentfa43621f8311f57b99d4a30fb848dc06deb514c2 (diff)
downloadchromium_src-3a8bdeaf675f4496a79b0adc034671cce3ffff00.zip
chromium_src-3a8bdeaf675f4496a79b0adc034671cce3ffff00.tar.gz
chromium_src-3a8bdeaf675f4496a79b0adc034671cce3ffff00.tar.bz2
Mac Sandbox: Fix crbug.com/60917 on 10.5
HOME_DIR_AS_LITERAL is now used on both 10.5 & 10.6 so remove from 10.6-only block. BUG=60917 TEST=Repro steps in bug Review URL: http://codereview.chromium.org/4691004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/sandbox_mac.mm25
1 files changed, 11 insertions, 14 deletions
diff --git a/chrome/common/sandbox_mac.mm b/chrome/common/sandbox_mac.mm
index 6ede3bf..42cec0c 100644
--- a/chrome/common/sandbox_mac.mm
+++ b/chrome/common/sandbox_mac.mm
@@ -485,23 +485,20 @@ bool Sandbox::EnableSandbox(SandboxProcessType sandbox_type,
substitutions["DISABLE_SANDBOX_DENIAL_LOGGING"] = SandboxSubstring("");
}
+ // Splice the path of the user's home directory into the sandbox profile
+ // (see renderer.sb for details).
+ std::string home_dir = base::SysNSStringToUTF8(NSHomeDirectory());
+
+ FilePath home_dir_canonical(home_dir);
+ GetCanonicalSandboxPath(&home_dir_canonical);
+
+ substitutions["USER_HOMEDIR_AS_LITERAL"] =
+ SandboxSubstring(home_dir_canonical.value(),
+ SandboxSubstring::LITERAL);
+
if (snow_leopard_or_higher) {
// 10.6-only Sandbox rules.
[tokens_to_remove addObject:@";10.6_ONLY"];
- // Splice the path of the user's home directory into the sandbox profile
- // (see renderer.sb for details).
- // This code is in the 10.6-only block because the sandbox syntax we use
- // for this "subdir" is only supported on 10.6.
- // If we ever need this on pre-10.6 OSs then we'll have to rethink the
- // surrounding sandbox syntax.
- std::string home_dir = base::SysNSStringToUTF8(NSHomeDirectory());
-
- FilePath home_dir_canonical(home_dir);
- GetCanonicalSandboxPath(&home_dir_canonical);
-
- substitutions["USER_HOMEDIR_AS_LITERAL"] =
- SandboxSubstring(home_dir_canonical.value(),
- SandboxSubstring::LITERAL);
} else {
// Sandbox rules only for versions before 10.6.
[tokens_to_remove addObject:@";BEFORE_10.6"];