sendmail 8.12.7 squawking after MS 4.11-1 upgrade

Julian Field mailscanner at ecs.soton.ac.uk
Thu Jan 23 19:20:55 GMT 2003


Oops, you're right of course.
Must remember not to code with one hand while drinking wine with the other :-)
Revised patch is below...

At 19:12 23/01/2003, you wrote:
>Shouldn't:
>
>+  $io0->fdopen(fileno(STDIN), "r"));
>+  $io1->fdopen(fileno(STDOUT),"w"));
>+  $io2->fdopen(fileno(STDERR),"w"));
>
>be:
>
>+  $io0->fdopen(fileno(STDIN), "r");
>+  $io1->fdopen(fileno(STDOUT),"w");
>+  $io2->fdopen(fileno(STDERR),"w");
>
>in the patch?

Revised patch is

--- /usr/sbin/MailScanner      Sun Jan 19 12:39:20 2003
+++ MailScanner Thu Jan 23 19:56:35 2003
@@ -37,6 +37,7 @@
  require 5.005;

  use FileHandle;
+use IO::Handle;
  use MailScanner::Config;
  use MailScanner::CustomConfig;
  use MailScanner::Lock;
@@ -261,6 +262,16 @@
  # If we are debugging, then just run once.
  #
  sub WorkForHours {
+  # Re-open the stdin, stdout and stderr file descriptors for
+  # sendmail's benefit. Should stop it squawking!
+  my($io0, $io1, $io2);
+  $io0 = new IO::Handle;
+  $io1 = new IO::Handle;
+  $io2 = new IO::Handle;
+  $io0->fdopen(fileno(STDIN), "r");
+  $io1->fdopen(fileno(STDOUT),"w");
+  $io2->fdopen(fileno(STDERR),"w");
+
    # Read the configuration file and start logging to syslog/stderr
    StartLogging($ConfFile);

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list