[Mimedefang] Embedded Perl problems - bugfix

Josh Kelley josh at jbc.edu
Wed Mar 24 14:15:37 EST 2004


I think that I've found and fixed a problem in MIMEDefang's embedded 
Perl mode.

The problem:  The MIMEDefang multiplexor uses the openlog and syslog 
functions to write to the syslog.  These functions use a file descriptor 
kept in a static variable somewhere to do the actual writing.  However, 
when the multiplexor forks off a child, the child closes all open FDs.  
If the Perl filter then opens a file, it may happen to get the same FD 
that the openlog/syslog functions expect to use.  Bad things ensue.  (On 
my system, the FD conflict was causing slave processes to hang.)

Solution:  Add a closelog() call to mimedefang-multiplexor.c's 
activateSlave function, just before "Close unneeded file descriptors" loop.

Josh Kelley



More information about the MIMEDefang mailing list