зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
cdfbc24f0a
Коммит
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче