From: rochecompaan Date: Wed, 24 Apr 2002 10:38:26 +0000 (+0000) Subject: All database files are now created group readable and writable. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c7830a270e22dec5426a92ae27f78d648e04f865;p=roundup.git All database files are now created group readable and writable. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@711 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 959ea21..b0b8a4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,7 @@ Feature: . stripping of the email message body can now be controlled through the config variables EMAIL_KEEP_QUOTED_TEXT and EMAIL_LEAVE_BODY_UNCHANGED. + . all database files created are now group readable and writable. Fixed: . stop sending blank (whitespace-only) notes diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 4735d04..be4bd4e 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.32 2002-04-15 23:25:15 richard Exp $ +#$Id: back_anydbm.py,v 1.33 2002-04-24 10:38:26 rochecompaan Exp $ ''' This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python @@ -61,6 +61,8 @@ class Database(FileStorage, hyperdb.Database): self.dirtynodes = {} # keep track of the dirty nodes by class self.newnodes = {} # keep track of the new nodes by class self.transactions = [] + # ensure files are group readable and writable + os.umask(0002) def __repr__(self): return ''%id(self) @@ -469,6 +471,12 @@ class Database(FileStorage, hyperdb.Database): # #$Log: not supported by cvs2svn $ +#Revision 1.32 2002/04/15 23:25:15 richard +#. node ids are now generated from a lockable store - no more race conditions +# +#We're using the portalocker code by Jonathan Feinberg that was contributed +#to the ASPN Python cookbook. This gives us locking across Unix and Windows. +# #Revision 1.31 2002/04/03 05:54:31 richard #Fixed serialisation problem by moving the serialisation step out of the #hyperdb.Class (get, set) into the hyperdb.Database.