On Sun, Jan 21, 2001 at 06:29:02AM +0100, Dag-Erling Smorgrav wrote:
# Steve Price <[EMAIL PROTECTED]> writes:
# > Is it just me or does 'syslogd -s' exhibit just a little bit too
# > much paranoia about allowing socket connections?  I was futzing
# > with a Perl script that needed to syslog(3) some stuff and after
# > much hair pulling I realized that 'syslogd -s' didn't even allow
# > connections from localhost.
# 
# RTFM ('perldoc Sys::Syslog' in this case, pay special attention to
# setlogsock())

Aha!  I must have read that manpage a dozen times and I didn't catch
on, but if I do this it works like I would expect even with '-s'.

#!/usr/bin/perl -w

use Sys::Syslog qw(:DEFAULT setlogsock);

setlogsock('unix');
openlog('foo', 'cons,ndelay,pid', 'local0');
syslog('emerg', 'emerg message');
closelog();

Thanks! :)

-steve


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to