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

Unified Diff: chrome/browser/utility_process_host.cc

Issue 2088006: Give the extension unpacker process a junction/symlink free path to the unpack directory. (Closed)
Patch Set: Rebase for commit. Created 10 years, 6 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 | « chrome/browser/extensions/sandboxed_extension_unpacker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/utility_process_host.cc
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 324a7f553ac290945a6c9c0144c479ee8c87da1f..be5397e667f7b9b7ffbd385f26af2b53f89130d0 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -26,32 +26,9 @@ UtilityProcessHost::~UtilityProcessHost() {
}
bool UtilityProcessHost::StartExtensionUnpacker(const FilePath& extension) {
- FilePath initial_path = extension.DirName();
- FilePath real_path;
-
- // The utility process will have access to the directory passed to
- // StartProcess(). That directory should not be a symlink or NTFS
- // junctions, because when the path is used, following the link will
- // cause file system access outside the sandbox path.
-
-#if defined(OS_POSIX)
- // Resolve symlinks to get a symlink free path.
- if (!file_util::RealPath(initial_path, &real_path)) {
- real_path = initial_path;
- }
-#else
- // TODO(skerner): For windows, we need to expand NTFS junctions.
- // http://crbug.com/13044
- real_path = initial_path;
-#endif
-
- // TODO(skerner): Remove this logging once we understand crbug.com/35198
- LOG(INFO) << "initial_path: " << initial_path.value();
- LOG(INFO) << "real_path: " << real_path.value();
-
// Grant the subprocess access to the entire subdir the extension file is
// in, so that it can unpack to that dir.
- if (!StartProcess(real_path))
+ if (!StartProcess(extension.DirName()))
return false;
Send(new UtilityMsg_UnpackExtension(extension));
« no previous file with comments | « chrome/browser/extensions/sandboxed_extension_unpacker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698