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:
dwitte%stanford.edu 2004-07-20 07:27:28 +00:00
Родитель cdfbc24f0a
Коммит dee773b6e5
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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;