Bug 1333681 - Part 1 - Normalize profile path before use in sandbox rules to avoid symlink issues; r=gcp
authorHaik Aftandilian <haftandilian@mozilla.com>
Tue, 24 Jan 2017 20:06:35 -0800
changeset 341133 6346ab10c61ed72f14861219336c69e85f2b5894
parent 341132 c0a4ffb1eb40cb21388ade2283f134f2d2edf8a6
child 341134 b57c0a563ecd514d6ec5acc255a9435b6128650b
push id86634
push usercbook@mozilla.com
push dateTue, 07 Feb 2017 13:14:58 +0000
treeherdermozilla-inbound@9dbd2d9b334e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgcp
bugs1333681
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1333681 - Part 1 - Normalize profile path before use in sandbox rules to avoid symlink issues; r=gcp MozReview-Commit-ID: 1vHJePZ8CPy
dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1260,16 +1260,17 @@ StartMacOSContentSandbox()
   }
 
   ContentChild* cc = ContentChild::GetSingleton();
 
   nsCOMPtr<nsIFile> profileDir;
   cc->GetProfileDir(getter_AddRefs(profileDir));
   nsCString profileDirPath;
   if (profileDir) {
+    profileDir->Normalize();
     rv = profileDir->GetNativePath(profileDirPath);
     if (NS_FAILED(rv) || profileDirPath.IsEmpty()) {
       MOZ_CRASH("Failed to get profile path");
     }
   }
 
   bool isFileProcess = cc->GetRemoteType().EqualsLiteral(FILE_REMOTE_TYPE);