From bd336ba27283106a5ae6b77f8a77561c644f114c Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Sun, 13 Dec 2009 02:13:43 +0000 Subject: [PATCH] restrict file permissions on linux to the user only --- db.cpp | 2 +- ui.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/db.cpp b/db.cpp index b21d1e3a2..c33f71ef7 100644 --- a/db.cpp +++ b/db.cpp @@ -79,7 +79,7 @@ CDB::CDB(const char* pszFile, const char* pszMode) : pdb(NULL) DB_THREAD | DB_PRIVATE | DB_RECOVER, - 0); + S_IRUSR | S_IWUSR); if (ret > 0) throw runtime_error(strprintf("CDB() : error %d opening database environment\n", ret)); fDbEnvInit = true; diff --git a/ui.cpp b/ui.cpp index 743230285..6d65720d7 100644 --- a/ui.cpp +++ b/ui.cpp @@ -3494,6 +3494,7 @@ bool CMyApp::OnInit2() SetAppName("Bitcoin"); #else SetAppName("bitcoin"); + umask(077); #endif //