Don't break under taint mode on OpenBSD. (thanks to Frank Denis /
Jedi/Sector One) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@141 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
b1fc4cafc5
commit
c68e306d17
3
Changes
3
Changes
@ -1,5 +1,8 @@
|
|||||||
0.26-dev
|
0.26-dev
|
||||||
|
|
||||||
|
Don't break under taint mode on OpenBSD. (thanks to Frank Denis /
|
||||||
|
Jedi/Sector One)
|
||||||
|
|
||||||
Have the qmail-queue plugin add the message-id to the "Queued!"
|
Have the qmail-queue plugin add the message-id to the "Queued!"
|
||||||
message we send back to the client (to help those odd sendmail using
|
message we send back to the client (to help those odd sendmail using
|
||||||
people debug their logs)
|
people debug their logs)
|
||||||
|
@ -55,6 +55,7 @@ sub notes {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $key = shift;
|
my $key = shift;
|
||||||
@_ and $self->{_notes}->{$key} = shift;
|
@_ and $self->{_notes}->{$key} = shift;
|
||||||
|
#warn Data::Dumper->Dump([\$self->{_notes}], [qw(notes)]);
|
||||||
$self->{_notes}->{$key};
|
$self->{_notes}->{$key};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +73,14 @@ sub body_write {
|
|||||||
|
|
||||||
$spool_dir .= "/" unless ($spool_dir =~ m!/$!);
|
$spool_dir .= "/" unless ($spool_dir =~ m!/$!);
|
||||||
|
|
||||||
|
$spool_dir =~ /^(.+)$/ or die "spool_dir not configured properly";
|
||||||
|
$spool_dir = $1;
|
||||||
|
|
||||||
|
if (-e $spool_dir) {
|
||||||
|
my $mode = (stat($spool_dir))[2];
|
||||||
|
die "Permissions on the spool_dir are not 0700" if $mode & 07077;
|
||||||
|
}
|
||||||
|
|
||||||
-d $spool_dir or mkdir($spool_dir, 0700) or die "Could not create spool_dir: $!";
|
-d $spool_dir or mkdir($spool_dir, 0700) or die "Could not create spool_dir: $!";
|
||||||
$self->{_filename} = $spool_dir . join(":", time, $$, $transaction_counter++);
|
$self->{_filename} = $spool_dir . join(":", time, $$, $transaction_counter++);
|
||||||
$self->{_filename} =~ tr!A-Za-z0-9:/_-!!cd;
|
$self->{_filename} =~ tr!A-Za-z0-9:/_-!!cd;
|
||||||
|
Loading…
Reference in New Issue
Block a user