diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp index 2878e8c63bb9..aeffea017027 100644 --- a/extensions/cookie/nsPermissionManager.cpp +++ b/extensions/cookie/nsPermissionManager.cpp @@ -861,7 +861,10 @@ nsPermissionManager::Write() } nsCOMPtr fileOutputStream; - rv = NS_NewSafeLocalFileOutputStream(getter_AddRefs(fileOutputStream), mPermissionsFile); + rv = NS_NewSafeLocalFileOutputStream(getter_AddRefs(fileOutputStream), + mPermissionsFile, + -1, + 0600); NS_ENSURE_SUCCESS(rv, rv); // get a buffered output stream 4096 bytes big, to optimize writes diff --git a/netwerk/cookie/src/nsCookieService.cpp b/netwerk/cookie/src/nsCookieService.cpp index 3d4001a09088..577ca83b3104 100644 --- a/netwerk/cookie/src/nsCookieService.cpp +++ b/netwerk/cookie/src/nsCookieService.cpp @@ -1036,7 +1036,10 @@ nsCookieService::Write() nsresult rv; nsCOMPtr fileOutputStream; - rv = NS_NewSafeLocalFileOutputStream(getter_AddRefs(fileOutputStream), mCookieFile); + rv = NS_NewSafeLocalFileOutputStream(getter_AddRefs(fileOutputStream), + mCookieFile, + -1, + 0600); if (NS_FAILED(rv)) { NS_ERROR("failed to open cookies.txt for writing"); return rv;