I did notice that the code in those areas is not correct, at least according to
the man page for Sys::Syslog
Excerpt from man page:
SYNOPSIS
use Sys::Syslog; # all except setlogsock, or:
use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock
setlogsock $sock_type;
openlog $ident, $logopt, $facility; # don't forget this
syslog $priority, $format, @args;
$oldmask = setlogmask $mask_priority;
closelog;
So I changed:
if ($log_facility ne 'stderr') {
eval {
setlogsock($log_socket);
syslog('debug', "spamd starting"); # required to actually open the socket
};
# Solaris sometimes doesn't support UNIX-domain syslog sockets apparently;
# same is true for perl 5.6.0 build on an early version of Red Hat 7!
if ($@) {
eval {
setlogsock('inet');
syslog('debug', "spamd starting");
};
$log_socket = 'inet' unless $@;
}
To:
if ($log_facility ne 'stderr') {
eval {
setlogsock($log_socket);
openlog("spamd","pid,nowait","mail");
syslog('debug', "spamd starting"); # required to actually open the socket
};
# Solaris sometimes doesn't support UNIX-domain syslog sockets apparently;
# same is true for perl 5.6.0 build on an early version of Red Hat 7!
if ($@) {
eval {
setlogsock('inet');
openlog("spamd","pid,nowait","mail");
syslog('debug', "spamd starting");
};
$log_socket = 'inet' unless $@;
}
And the new error is:
unix dgram connect: Socket operation on non-socket at /usr/local/bin/spamd line
283
getservbyname failed for tcp at /usr/local/bin/spamd line 292
udp connect: nobody listening at /usr/local/bin/spamd line 292
failed to setlogsock(unix) on this platform; reporting logs to stderr
>
> On Fri, 2004-08-13 at 10:30, Baker, Darryl wrote:
> > I figured it must be a perl library problem so I updated all the
> > related perl libraries.
>
> Yes, that was my next thought. Initially, I ran SA using Solaris 9 perl
> and added dependencies via CPAN. It worked fine. Now, I have changed
> to the packages from blastwave.org, since I was very involved in testing
> their first SA pkg.
>
> Alex
>
--
__ _ __
/ ) // / ) / Darryl Baker
/ / __. __ __ __ , // /--< __. /_ _ __ http://www.bl.com/~dpb
/__/_(_/|_/ (_/ (_/ (_/_</_ /___/_(_/|_/ <_</_/ (_ mailto:[EMAIL PROTECTED]
/
'