http://bugzilla.spamassassin.org/show_bug.cgi?id=3653
------- Additional Comments From [EMAIL PROTECTED] 2004-08-26 09:11 -------
Subject: Re: umask gets overwriten in UnixLocker.pm
On Thu, Aug 26, 2004 at 05:25:38AM -0700, [EMAIL PROTECTED] wrote:
> Looking through the code it looks like Flock::safe_lock doesn't restore umask.
Hrm. Looking at the function, I would agree. :(
> BayesStore::DBM.pm also has several places that set umask to 0 and then exit
> on
> failure without restoring it, using a "do_something() or return 0;" idiom.
The only place in DBM that needs a change is in restore_database() before the
returns:
my $umask = umask 0;
unless (tie %new_toks, "DB_File", $tmptoksdbname, O_RDWR|O_CREAT|O_EXCL,
(oct ($main->{conf}->{bayes_file_mode}) & 0666)) {
dbg("bayes: Failed to tie temp toks db: $!");
$self->untie_db();
return 0;
}
unless (tie %new_seen, "DB_File", $tmpseendbname, O_RDWR|O_CREAT|O_EXCL,
(oct ($main->{conf}->{bayes_file_mode}) & 0666)) {
dbg("bayes: Failed to tie temp seen db: $!");
untie %new_toks;
unlink $tmptoksdbname;
$self->untie_db();
return 0;
}
umask $umask;
The rest of DBM is fine from what I can tell.
patch forthcoming. :(
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.