summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/linux/suid/sandbox.cc11
-rw-r--r--sandbox/sandbox.gyp3
2 files changed, 13 insertions, 1 deletions
diff --git a/sandbox/linux/suid/sandbox.cc b/sandbox/linux/suid/sandbox.cc
index ea53406..a2332d8 100644
--- a/sandbox/linux/suid/sandbox.cc
+++ b/sandbox/linux/suid/sandbox.cc
@@ -25,7 +25,16 @@
#define CLONE_NEWPID 0x20000000
#endif
-static const char kChromeBinary[] = "/opt/google/chrome/chrome";
+#if !defined(LINUX_SANDBOX_CHROME_PATH) && \
+ !defined(CHROME_DEVEL_SANDBOX)
+#error LINUX_SANDBOX_CHROME_PATH must be defined to be the location of the \
+ Chrome binary, or CHROME_DEVEL_SANDBOX must be defined
+#endif
+
+#if defined(LINUX_SANDBOX_CHROME_PATH)
+static const char kChromeBinary[] = LINUX_SANDBOX_CHROME_PATH;
+#endif
+
static const char kSandboxDescriptorEnvironmentVarName[] = "SBX_D";
// These are the magic byte values which the sandboxed process uses to request
diff --git a/sandbox/sandbox.gyp b/sandbox/sandbox.gyp
index 76e5dd3..6ca2cef 100644
--- a/sandbox/sandbox.gyp
+++ b/sandbox/sandbox.gyp
@@ -19,6 +19,9 @@
},
],
],
+ 'defines': [
+ 'LINUX_SANDBOX_CHROME_PATH="<(linux_sandbox_chrome_path)"',
+ ],
'sources': [
'linux/suid/sandbox.cc',
],