http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4935
Summary: Wrong mode for lock files when lock_method => flock
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
$ ls -l .spamassassin|awk '/whitelist/{print $1 " " $8}'
-rw------- auto-whitelist
-rw-rw-rw- auto-whitelist.mutex
$ rm .spamassassin/auto-whitelist*
$ LANG=C ./saumask.pl 0770
auto-whitelist: open of auto-whitelist file failed: auto-whitelist: cannot open
auto_whitelist_path /home/users/radek/.spamassassin/auto-whitelist: No such file
or directory
$ ls -l .spamassassin|awk '/whitelist/{print $1 " " $8}'
-r--rw--w- auto-whitelist.mutex
saumask.pl attached.
Summary: SA ignores user-set umask (naughty), sets umask(0) at one point (very
naughty) and sets umask(auto_whitelist_file_mode ^ 0770) (WTF is that XOR doing
out there?).
Attached patch (against current trunk):
* kills umask(0)
* sets file permissions to auto_whitelist_file_mode (using umask(~$mode))
* still ignores user-set umask (not really a problem, as default
auto_whitelist_file_mode is 0700
* uses 0700 instead of '0700'
* kills one goto, (hopefully) making the function more readable
* adds some vim lines.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.