Line 0
Link Here
|
|
|
1 |
--- lib/Mail/SpamAssassin/Util.pm 2011-06-06 19:59:17.000000000 -0400 |
2 |
+++ lib/Mail/SpamAssassin/Util.pm 2011-08-26 17:12:19.000000000 -0400 |
3 |
@@ -1025,6 +1024,8 @@ |
4 |
return; |
5 |
} |
6 |
|
7 |
+ opendir(my $dh, $tmpdir) || die "Could not open $tmpdir: $!"; |
8 |
+ closedir $dh; |
9 |
my ($reportfile, $tmpfile); |
10 |
my $umask = umask 077; |
11 |
|
12 |
@@ -1052,7 +1053,10 @@ |
13 |
|
14 |
# ensure the file handle is not semi-open in some way |
15 |
if ($tmpfile) { |
16 |
- close $tmpfile or info("error closing $reportfile: $!"); |
17 |
+ if (! close $tmpfile) { |
18 |
+ info("error closing $reportfile: $!"); |
19 |
+ $tmpfile=undef; |
20 |
+ } |
21 |
} |
22 |
} |
23 |
|
24 |
--- sa-update.raw 2011-06-24 13:38:50.000000000 -0400 |
25 |
+++ sa-update.raw 2011-08-29 09:38:50.000000000 -0400 |
26 |
@@ -677,9 +677,9 @@ |
27 |
|
28 |
# Write the content out to a temp file for GPG/Archive::Tar interaction |
29 |
dbg("channel: populating temp content file"); |
30 |
- open(TMP, ">$content_file") || die "fatal: can't write to content temp file $content_file: $!\n"; |
31 |
+ open(TMP, ">$content_file") || die "fatal: couldn't create content temp file $content_file: $!\n"; |
32 |
binmode TMP; |
33 |
- print TMP $content; |
34 |
+ print TMP $content || die "fatal: can't write to content temp file $content_file: $!\n"; |
35 |
close(TMP); |
36 |
|
37 |
# to sign : gpg -bas file |
38 |
@@ -695,7 +695,7 @@ |
39 |
die "fatal: couldn't create temp file for GPG signature: $!\n"; |
40 |
} |
41 |
binmode $tfh; |
42 |
- print $tfh $GPG; |
43 |
+ print $tfh $GPG || die "fatal: can't write temp file for GPG signature: $!\n"; |
44 |
close($tfh); |
45 |
|
46 |
dbg("gpg: calling gpg"); |
47 |
|