mail[Wesnoth-commits] r33436 - /trunk/src/preferences.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by thomas . baumhauer on March 08, 2009 - 17:32:
Author: baufo
Date: Sun Mar  8 17:32:36 2009
New Revision: 33436

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33436&view=rev
Log:
hardcode preferences file permissions to 0600

Modified:
    trunk/src/preferences.cpp

Modified: trunk/src/preferences.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/preferences.cpp?rev=33436&r1=33435&r2=33436&view=diff
==============================================================================
--- trunk/src/preferences.cpp (original)
+++ trunk/src/preferences.cpp Sun Mar  8 17:32:36 2009
@@ -22,7 +22,6 @@
 #define GETTEXT_DOMAIN "wesnoth-lib"
 
 #include "filesystem.hpp"
-#include "game_preferences.hpp"
 #include "gui/widgets/settings.hpp"
 #include "hotkeys.hpp"
 #include "preferences.hpp"
@@ -76,17 +75,7 @@
 
     #ifndef _WIN32
 
-       // Make the preferences file only user readable if it contains a 
password
-
-       // Is it really impossible to read the umask without setting it at 
the same time?
-       int mask = umask(0);
-       umask(mask);
-
-    if(chmod(get_prefs_file().c_str(),
-                // If we save the password set the preferences file only 
user readable,
-                // otherwise set it according to the umask
-                remember_password() ? S_IRUSR | S_IWUSR : 0666 - mask
-                ) == -1) {
+    if(chmod(get_prefs_file().c_str(), 0600) == -1) {
         std::cerr << "error setting permissions of preferences file '" << 
get_prefs_file() << "'\n";
     }
 




Related Messages


Powered by MHonArc, Updated Sun Mar 08 17:40:33 2009