Bug 1385816 - nsFileStreamBase::DoOpen() should call directory creation with 0755 permission instead of 0644. r=bz
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 31 Jul 2017 11:00:00 -0400
changeset 420854 274298ae4f2376884dec227fd1eea6c66efecd91
parent 420853 1a42d8f96f2725d91dfe96e4b3bfb6a133ecbc2d
child 420855 559f7f92c891782597759947b89be636c2d4767b
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1385816
milestone56.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 1385816 - nsFileStreamBase::DoOpen() should call directory creation with 0755 permission instead of 0644. r=bz
netwerk/base/nsFileStreams.cpp
--- a/netwerk/base/nsFileStreams.cpp
+++ b/netwerk/base/nsFileStreams.cpp
@@ -327,17 +327,17 @@ nsFileStreamBase::DoOpen()
 
     if (mOpenParams.ioFlags & PR_CREATE_FILE) {
         nsCOMPtr<nsIFile> parent;
         mOpenParams.localFile->GetParent(getter_AddRefs(parent));
 
         // Result doesn't need to be checked. If the file's parent path does not
         // exist, make it. If it does exist, do nothing.
         if (parent) {
-            Unused << parent->Create(nsIFile::DIRECTORY_TYPE, 0644);
+            Unused << parent->Create(nsIFile::DIRECTORY_TYPE, 0755);
         }
     }
 
 #ifdef XP_WIN
     if (mBehaviorFlags & nsIFileInputStream::SHARE_DELETE) {
       nsCOMPtr<nsILocalFileWin> file = do_QueryInterface(mOpenParams.localFile);
       MOZ_ASSERT(file);