You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/07/18 22:30:31 UTC

[Bug 5566] Access denied writing to tmp file

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5566





------- Additional Comments From felicity@apache.org  2007-07-18 13:30 -------
it's worth noting that when this came up (on the users@ list iirc), it was
specifically related to the Message code using temp files for non-text raw
parts.  it appeared, based on the errors, that even if secure_tmpfile() failed,
Message continued on assuming the file existed, thereby causing a bunch of other
errors to pop up later on if that part was accessed.

the code looks like it's doing the right thing, but then why do the errors come
up? :)   so we should verify the issue anyway.


  if ($msg->{'type'} !~ m@^(?:text/(?:plain|html)$|message\b)@) {
    my $filepath;
    ($filepath, $msg->{'raw'}) = Mail::SpamAssassin::Util::secure_tmpfile();

    if ($filepath) {
      # The temp file was created, add it to the list of pending deletions
      # we cannot just delete immediately in the POSIX idiom, as this is
      # unportable (to win32 at least)
      push @{$self->{tmpfiles}}, $filepath;
      $msg->{'raw'}->print(@{$body});
    }
  }

  # if the part didn't get a temp file, go ahead and store the data in memory
  if (!exists $msg->{'raw'}) {
    $msg->{'raw'} = $body;
  }




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.