mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
make cookie & permission files non-world-readable.
b=59557, patch by Pavel Kankovsky (peak@argo.troja.mff.cuni.cz), r=dwitte, sr=bz.
This commit is contained in:
parent
cdfbc24f0a
commit
dee773b6e5
@ -861,7 +861,10 @@ nsPermissionManager::Write()
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIOutputStream> 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
|
||||
|
@ -1036,7 +1036,10 @@ nsCookieService::Write()
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIOutputStream> 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user