Fix default Maildir File permissions.
open() and os.open() lead to different file permissions by default, and while we have not changed the os.open that had been used, some code changes led to these permissions slipping through. Fix this by setting the permissions explicitly to 0666 (minus the users umask). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
0d3303ec12
commit
f5366343b9
@ -21,6 +21,9 @@ Changes
|
|||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
* New emails are not created with "-rwxr-xr-x" but as "-rw-r--r--"
|
||||||
|
anymore, fixing a regression in 6.3.4.
|
||||||
|
|
||||||
Pending for the next major release
|
Pending for the next major release
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ class MaildirFolder(BaseFolder):
|
|||||||
# open file and write it out
|
# open file and write it out
|
||||||
try:
|
try:
|
||||||
fd = os.open(os.path.join(tmpdir, messagename),
|
fd = os.open(os.path.join(tmpdir, messagename),
|
||||||
os.O_EXCL|os.O_CREAT|os.O_WRONLY)
|
os.O_EXCL|os.O_CREAT|os.O_WRONLY, 0666)
|
||||||
except OSError, e:
|
except OSError, e:
|
||||||
if e.errno == 17:
|
if e.errno == 17:
|
||||||
#FILE EXISTS ALREADY
|
#FILE EXISTS ALREADY
|
||||||
|
Loading…
Reference in New Issue
Block a user