Date: Thu, 19 Dec 2002 09:11:33 -0500 From: Leo Bicknell <bicknell@ufp.org> To: freebsd-hackers@freebsd.org Subject: Re: Perl issue on freebsd 4.x? Message-ID: <20021219141133.GA17261@ussenterprise.ufp.org> In-Reply-To: <20021219073640.B4F204633@bert.kts.org> References: <20021219022152.GA6708@ussenterprise.ufp.org> <20021219073640.B4F204633@bert.kts.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Thu, Dec 19, 2002 at 08:36:40AM +0100, Hellmuth Mic= haelis wrote: > Syslogd on the machine listens on an "*.syslog" udp4 socket. The machine > is multihomed. The "-s" flag to syslogd is explained as "Do not log=20 > messages from remote machines" - perhaps the perl process is considered > to be remote ?=20 % uname -r 4.7-RELEASE % ps ax | grep syslog 76 ?? Ss 0:04.80 /usr/sbin/syslogd -s % cat syslogtest #!/usr/bin/perl use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('unix'); openlog('syslogtest', 'cons,pid', 'mail') || warn "openlog: $!"; syslog('info', 'this should go into the mail log') || warn "syslog: $!"; closelog() || warn "closelog: $!"; setlogsock('inet'); openlog('syslogtest', 'cons,pid', 'mail') || warn "openlog: $!"; syslog('info', 'this should go into the mail log') || warn "syslog: $!"; closelog() || warn "closelog: $!"; % ./syslogtest openlog: at ./syslogtest line 6. closelog: Bad file descriptor at ./syslogtest line 8. openlog: Bad file descriptor at ./syslogtest line 11. closelog: Bad file descriptor at ./syslogtest line 13. I get the exact same behavior on another machine, which insted of -s uses the -a feature (access list) allowing 127.0.0.1, the machine's own IP, and several remote IP's. My test box (that I could run syslog without -s on) is down for the moment, I'll poke at it as soon as it's fixed. That said, everything else on both of these machines syslogs just fine, and since the failure seems to be in openlog (which I believe just creates a unix domain or UDP socket, both of which should succeed even if syslog isn't running) I don't think the security makes a difference. I also find it odd that I can get no error out of openlog, and when I dig into it with the perl debugger I can't tell anything other than it's call to create the socket fails, but I have no idea why. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE+AdOVNh6mMG5yMTYRAky9AJ9DLf/tr3DU6MtSjE7dffxXLvXH1wCfc6XP OisXHBsviZFt01EsD5pWBy4= =hijr -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021219141133.GA17261>