Skip Menu |
 

This queue is for tickets about the Sys-Syslog CPAN distribution.

Report information
The Basics
Id: 20164
Status: resolved
Priority: 0/
Queue: Sys-Syslog

People
Owner: SAPER [...] cpan.org
Requestors: ntyni [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.16
Fixed in: 0.17



Subject: connect_unix() breaks if setlogsock is called first
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1151500794-21934-22"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 606
Download (untitled) / with headers
text/plain 606b
Hi, in Sys::Syslog 0.16, syslog() is failing with no connection to syslog available - _PATH_LOG not available in syslog.h at /home/niko/t.pl line 5 if setlogsock('unix') is called first. Sample program: #!/usr/bin/perl -w use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('unix'); openlog("test", 'pid', 'local0'); syslog('local0|info', "test"); This happens because the test at the beginning of connect_unix() isn't prepared for the case where $syslog_path is already defined. Proposed patch attached. I have verified this on perl 5.8.8, on Debian GNU/Linux. Cheers, -- Niko Tyni ntyni@iki.fi
Subject: syslog-patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1151500794-21934-21"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="syslog-patch"
Content-Disposition: inline; filename="syslog-patch"
Content-Transfer-Encoding: base64
Content-Length: 340
Download syslog-patch
application/octet-stream 340b

Message body not shown because it is not plain text.

X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=3.0 required=8.0 tests=BAYES_00,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_CBL
In-Reply-To: <rt-3.5.HEAD-21934-1151500797-747.20164-4-0 [...] rt.cpan.org>
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-20164 [...] rt.cpan.org> <rt-3.5.HEAD-21934-1151500797-747.20164-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ISO-8859-1
Received: from localhost (diesel.bestpractical.com [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 0AEBE4D8250 for <cpan-bug+sys-syslog [...] diesel.bestpractical.com>; Wed, 28 Jun 2006 10:22:58 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 84EC04D80E7 for <bug-Sys-Syslog [...] rt.cpan.org>; Wed, 28 Jun 2006 10:22:58 -0400 (EDT)
Received: (qmail 29576 invoked by alias); 28 Jun 2006 14:22:57 -0000
Received: from smtp5-g19.free.fr (HELO smtp5-g19.free.fr) (212.27.42.35) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 28 Jun 2006 07:22:51 -0700
Received: from imp1-g19.free.fr (imp1-g19.free.fr [212.27.42.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id BD81824099 for <bug-Sys-Syslog [...] rt.cpan.org>; Wed, 28 Jun 2006 16:22:44 +0200 (CEST)
Received: by imp1-g19.free.fr (Postfix, from userid 33) id A7F626309; Wed, 28 Jun 2006 16:22:44 +0200 (CEST)
Received: from wormhole.x-echo.com (wormhole.x-echo.com [193.252.148.11]) by imp1-g19.free.fr (IMP) with HTTP for <maddingue [...] 127.0.0.1>; Wed, 28 Jun 2006 16:22:44 +0200
Delivered-To: cpan-bug+sys-syslog [...] diesel.bestpractical.com
User-Agent: Internet Messaging Program (IMP) 3.2.5
Subject: Re: [rt.cpan.org #20164] connect_unix() breaks if setlogsock is called first
Return-Path: <saper [...] cpan.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+sys-syslog [...] diesel.bestpractical.com
Date: Wed, 28 Jun 2006 16:22:44 +0200
Message-Id: <1151504564.44a290b48c7a9 [...] imp1-g19.free.fr>
X-Originating-Ip: 193.252.148.11
To: bug-Sys-Syslog [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-21934-1151504584-875.20164-0-0 [...] rt.cpan.org>
Content-Length: 428
Download (untitled) / with headers
text/plain 428b
Show quoted text
> in Sys::Syslog 0.16, syslog() is failing [...] if setlogsock('unix') > is called first. > > This happens because the test at the beginning of connect_unix() isn't > prepared for the case where $syslog_path is already defined.
This is indeed a bug that was added with version 0.16. Show quoted text
> Proposed patch attached.
Thanks. It will be included in the next release. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-21934-1151504584-875.20164-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <RT-Ticket-20164 [...] rt.cpan.org> <rt-3.5.HEAD-21934-1151500797-747.20164-4-0 [...] rt.cpan.org> <1151504564.44a290b48c7a9 [...] imp1-g19.free.fr> <rt-3.5.HEAD-21934-1151504584-875.20164-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-11279-1153275182-1964.20164-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: GIRAFFED [...] cpan.org
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 179
Download (untitled) / with headers
text/plain 179b
The message would be more accurate as, "_PATH_LOG not available in syslog.h and you didn't specify a log socket name with setlogsock()." I.e. _PATH_LOG isn't actually required.
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0 (Apple Message framework v552)
X-Spam-Status: No, hits=-2.5 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO
In-Reply-To: <rt-3.6.HEAD-11279-1153275182-1964.20164-5-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.552)
Received-SPF: neutral (x1.develooper.com: local policy)
Content-Type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: ISO-8859-1
Received: from localhost (diesel.bestpractical.com [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 5228D4D839A for <cpan-bug+sys-syslog [...] diesel.bestpractical.com>; Thu, 20 Jul 2006 21:13:53 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id D90B24D80C7 for <bug-Sys-Syslog [...] rt.cpan.org>; Thu, 20 Jul 2006 21:13:52 -0400 (EDT)
Received: (qmail 7208 invoked by alias); 21 Jul 2006 01:13:51 -0000
Received: from smtp4-g19.free.fr (HELO smtp4-g19.free.fr) (212.27.42.30) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 20 Jul 2006 18:13:50 -0700
Received: from cpan.org (ant06-1-82-242-109-222.fbx.proxad.net [82.242.109.222]) by smtp4-g19.free.fr (Postfix) with ESMTP id 2CF9C4F5E6 for <bug-Sys-Syslog [...] rt.cpan.org>; Fri, 21 Jul 2006 03:13:44 +0200 (CEST)
Delivered-To: cpan-bug+sys-syslog [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #20164] connect_unix() breaks if setlogsock is called first
Return-Path: <saper [...] cpan.org>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+sys-syslog [...] diesel.bestpractical.com
Date: Fri, 21 Jul 2006 03:13:41 +0200
Message-Id: <25B91A38-1856-11DB-9D35-000502F3279F [...] cpan.org>
To: bug-Sys-Syslog [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-11611-1153444437-58.20164-0-0 [...] rt.cpan.org>
Content-Length: 341
Download (untitled) / with headers
text/plain 341b
Show quoted text
> The message would be more accurate as, "_PATH_LOG not available in > syslog.h and you didn't specify a log socket name with setlogsock()." > > I.e. _PATH_LOG isn't actually required.
Correct. Thanks for noting. Sébastien Aperghis-Tramoni -- - --- -- - -- - --- -- - --- -- - --[ http://maddingue.org ] Close the world, txEn eht nepO


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.