cvs commit: qpsmtpd/lib/Qpsmtpd Transaction.pm

[email protected] (Ask Bjoern Hansen)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     03/04/21 01:23:35

  Modified:    .        Changes
               lib/Qpsmtpd Transaction.pm
  Log:
  Don't break under taint mode on OpenBSD. (thanks to Frank Denis /
  Jedi/Sector One)
  
  Revision  Changes    Path
  1.42      +3 -0      qpsmtpd/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/Changes,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -w -r1.41 -r1.42
  --- Changes	16 Apr 2003 16:45:57 -0000	1.41
  +++ Changes	21 Apr 2003 08:23:35 -0000	1.42
  @@ -1,5 +1,8 @@
   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!"
     message we send back to the client (to help those odd sendmail using
     people debug their logs)
  
  
  
  1.4       +9 -0      qpsmtpd/lib/Qpsmtpd/Transaction.pm
  
  Index: Transaction.pm
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/Transaction.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- Transaction.pm	24 Sep 2002 10:56:35 -0000	1.3
  +++ Transaction.pm	21 Apr 2003 08:23:35 -0000	1.4
  @@ -55,6 +55,7 @@
     my $self = shift;
     my $key  = shift;
     @_ and $self->{_notes}->{$key} = shift;
  +  #warn Data::Dumper->Dump([\$self->{_notes}], [qw(notes)]);
     $self->{_notes}->{$key};
   }
   
  @@ -71,6 +72,14 @@
                                                   : Qpsmtpd::Utils::tildeexp('~/tmp/');
   
        $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: $!";
        $self->{_filename} = $spool_dir . join(":", time, $$, $transaction_counter++);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.