restrict file permissions on linux to the user only

This commit is contained in:
s_nakamoto 2009-12-13 02:13:43 +00:00
parent 25b12b8839
commit bd336ba272
2 changed files with 2 additions and 1 deletions

2
db.cpp
View file

@ -79,7 +79,7 @@ CDB::CDB(const char* pszFile, const char* pszMode) : pdb(NULL)
DB_THREAD | DB_THREAD |
DB_PRIVATE | DB_PRIVATE |
DB_RECOVER, DB_RECOVER,
0); S_IRUSR | S_IWUSR);
if (ret > 0) if (ret > 0)
throw runtime_error(strprintf("CDB() : error %d opening database environment\n", ret)); throw runtime_error(strprintf("CDB() : error %d opening database environment\n", ret));
fDbEnvInit = true; fDbEnvInit = true;

1
ui.cpp
View file

@ -3494,6 +3494,7 @@ bool CMyApp::OnInit2()
SetAppName("Bitcoin"); SetAppName("Bitcoin");
#else #else
SetAppName("bitcoin"); SetAppName("bitcoin");
umask(077);
#endif #endif
// //