Skip to content

Commit 5c34b76

Browse files
author
Roche Compaan
committed
All database files are now created group readable and writable.
1 parent 982cb05 commit 5c34b76

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Feature:
2121
</td>
2222
. stripping of the email message body can now be controlled through the
2323
config variables EMAIL_KEEP_QUOTED_TEXT and EMAIL_LEAVE_BODY_UNCHANGED.
24+
. all database files created are now group readable and writable.
2425

2526
Fixed:
2627
. stop sending blank (whitespace-only) notes

roundup/backends/back_anydbm.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.32 2002-04-15 23:25:15 richard Exp $
18+
#$Id: back_anydbm.py,v 1.33 2002-04-24 10:38:26 rochecompaan Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -61,6 +61,8 @@ def __init__(self, config, journaltag=None):
6161
self.dirtynodes = {} # keep track of the dirty nodes by class
6262
self.newnodes = {} # keep track of the new nodes by class
6363
self.transactions = []
64+
# ensure files are group readable and writable
65+
os.umask(0002)
6466

6567
def __repr__(self):
6668
return '<back_anydbm instance at %x>'%id(self)
@@ -469,6 +471,12 @@ def rollback(self):
469471

470472
#
471473
#$Log: not supported by cvs2svn $
474+
#Revision 1.32 2002/04/15 23:25:15 richard
475+
#. node ids are now generated from a lockable store - no more race conditions
476+
#
477+
#We're using the portalocker code by Jonathan Feinberg that was contributed
478+
#to the ASPN Python cookbook. This gives us locking across Unix and Windows.
479+
#
472480
#Revision 1.31 2002/04/03 05:54:31 richard
473481
#Fixed serialisation problem by moving the serialisation step out of the
474482
#hyperdb.Class (get, set) into the hyperdb.Database.

0 commit comments

Comments
 (0)