+ Create temp files with permissions 0600 (thanks to Robert James Kaes again)

+
+  Fix warning in check_badrcptto plugin (Thanks to Robert James Kaes)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@230 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2004-04-21 12:42:45 +00:00
parent d8c8d40ef6
commit bbc36670f7
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
0.28 0.28
Create temp files with permissions 0600 (thanks to Robert James Kaes again)
Fix warning in check_badrcptto plugin (Thanks to Robert James Kaes)
Proper "Log levels" with a configuration option Proper "Log levels" with a configuration option
$Include feature in config/plugins $Include feature in config/plugins

View File

@ -81,7 +81,7 @@ sub body_write {
-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;
$self->{_body_file} = IO::File->new($self->{_filename}, O_RDWR|O_CREAT) $self->{_body_file} = IO::File->new($self->{_filename}, O_RDWR|O_CREAT, 0600)
or die "Could not open file $self->{_filename} - $! "; # . $self->{_body_file}->error; or die "Could not open file $self->{_filename} - $! "; # . $self->{_body_file}->error;
} }
# go to the end of the file # go to the end of the file

View File

@ -16,7 +16,7 @@ sub check_for_badrcptto {
return (DENY, "mail to $bad not accepted here") return (DENY, "mail to $bad not accepted here")
if $bad eq $from; if $bad eq $from;
return (DENY, "mail to $bad not accepted here") return (DENY, "mail to $bad not accepted here")
if substr($bad,0,1) eq '@' && $bad eq "@$host"; if substr($bad,0,1) eq '@' && $bad eq "\@$host";
} }
return (DECLINED); return (DECLINED);
} }