changeset 35:a2b58cad2338 draft

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
author s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>
date Sun, 13 Dec 2009 02:13:43 +0000
parents 2b7d01869fa4
children c1691e07077d
files db.cpp ui.cpp
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/db.cpp
+++ b/db.cpp
@@ -79,7 +79,7 @@
                              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;
--- a/ui.cpp
+++ b/ui.cpp
@@ -3494,6 +3494,7 @@
     SetAppName("Bitcoin");
 #else
     SetAppName("bitcoin");
+    umask(077);
 #endif
 
     //