Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: chrome/browser/zygote_host_linux.cc

Issue 155584: Merge 20733 - Linux: propagate LD_LIBRARY_PATH through the SUID sandbox.... (Closed) Base URL: svn://chrome-svn/chrome/branches/194/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sandbox/linux/suid/sandbox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/zygote_host_linux.cc
===================================================================
--- chrome/browser/zygote_host_linux.cc (revision 20732)
+++ chrome/browser/zygote_host_linux.cc (working copy)
@@ -53,6 +53,13 @@
(st.st_mode & S_ISUID) &&
(st.st_mode & S_IXOTH)) {
cmd_line.PrependWrapper(ASCIIToWide(kSandboxBinary));
+
+ // SUID binaries clear LD_LIBRARY_PATH. However, the sandbox binary needs
+ // to run its child processes with the correct LD_LIBRARY_PATH so we save
+ // a copy here:
+ const char* ld_library_path = getenv("LD_LIBRARY_PATH");
+ if (ld_library_path)
+ setenv("SANDBOX_LD_LIBRARY_PATH", ld_library_path, 1 /* overwrite */);
} else {
LOG(FATAL) << "The SUID sandbox helper binary was found, but is not "
"configured correctly. Rather than run without sandboxing "
Property changes on: chrome\browser\zygote_host_linux.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/chrome/browser/zygote_host_linux.cc:r69-2775
Merged /trunk/src/chrome/browser/zygote_host_linux.cc:r20571,20733
« no previous file with comments | « no previous file | sandbox/linux/suid/sandbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698