From owner-freebsd-current Sat Jan 20 21:46:45 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail.hiwaay.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (Postfix) with ESMTP id AFFA437B402 for ; Sat, 20 Jan 2001 21:46:28 -0800 (PST) Received: from bonsai.knology.net (user-24-214-88-8.knology.net [24.214.88.8]) by mail.hiwaay.net (8.11.0/8.11.0) with ESMTP id f0L5kQo13782; Sat, 20 Jan 2001 23:46:27 -0600 (CST) Received: (from steve@localhost) by bonsai.knology.net (8.11.1/8.11.1) id f0L5kQV05048; Sat, 20 Jan 2001 23:46:26 -0600 (CST) (envelope-from steve) Date: Sat, 20 Jan 2001 23:46:26 -0600 From: Steve Price To: Dag-Erling Smorgrav Cc: current@FreeBSD.ORG Subject: Re: excessive paranoia in syslogd(8)? Message-ID: <20010120234626.K387@bonsai.knology.net> References: <20010120224944.I387@bonsai.knology.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Sun, Jan 21, 2001 at 06:29:02AM +0100 X-Operating-System: FreeBSD 4.2-STABLE i386 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 21, 2001 at 06:29:02AM +0100, Dag-Erling Smorgrav wrote: # Steve Price 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message