From e899779450bcd940dcdb0108d27c35eae92cc1e1 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 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@47 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- db.cpp | 2 +- ui.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/db.cpp b/db.cpp index b21d1e3a..c33f71ef 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 74323028..6d65720d 100644 --- a/ui.cpp +++ b/ui.cpp @@ -3494,6 +3494,7 @@ bool CMyApp::OnInit2() SetAppName("Bitcoin"); #else SetAppName("bitcoin"); + umask(077); #endif //