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 2008/01/15 21:21:05 UTC

[Bug 5591] make test fails at spamd_hup test

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





------- Additional Comments From rosenbaumlm@ornl.gov  2008-01-15 12:21 -------
This bug still exists in v3.2.4.  I have been able to get more information on 
why it occurs on some of our systems but not on others.

The Perl executable is installed in /usr/local/bin with a symlink 
from /usr/bin:

lrwxrwxrwx   1 root           19 Jul 18  2005 /usr/bin/perl -
> /usr/local/bin/perl
-rwxr-xr-x   2 root      1141560 May 10  2007 /usr/local/bin/perl

If the PATH has /usr/local/bin before /usr/bin, then the spamd_hup test runs 
without error.
If the PATH has /usr/bin before /usr/local/bin, then the spamd_hup test fails 
as shown above.

I think that the problem is in this section of spamd:

  my $perl = Mail::SpamAssassin::Util::untaint_var($^X);
  my @execs = ( $perl, "-T", "-w", $ORIG_ARG0, @ORIG_ARGV );

  if ($perl eq $perl_from_hashbang_line) {
    # we're using the same perl as the script uses on the #! line;
    # we can safely just exec the script
    @execs = ( $ORIG_ARG0, @ORIG_ARGV );
  }

  warn "spamd: restarting using '" . join (' ', @execs) . "'\n";
  exec @execs;

When /usr/bin comes first in the PATH, the block controlled by the "if" is 
executed.  Since the "-T" switch is NOT saved in @ORIG_ARGV, the exec goes 
boom.  I don't know the best way to fix the problem, but it seems like leaving 
out the "if" block will fix it.



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