Bug 59384 - Problems with Sys::Syslog (syslog.pm)
Summary: Problems with Sys::Syslog (syslog.pm)
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Chip Turner
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-02-06 19:49 UTC by Daniel Hanks
Modified: 2007-04-18 16:39 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-04-11 15:08:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Daniel Hanks 2002-02-06 19:49:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.3-12 i686)

Description of problem:
There appears to be a bug in the syslog.pm module installed with perl-5.6.0-17.
Trying to use the setlogsock function of the module dies with an error.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create and run this sample program:

#!/usr/bin/perl -w
use strict;
use Sys::Syslog qw(:DEFAULT setlogsock);
openlog ('foo', 'cons,pid', 'local6');
syslog ("warning", "%s", "foo");

Actual Results:  This bails with:
Usage: Sys::Syslog::_PATH_LOG() at /usr/lib/perl5/5.6.0/i386-linux/Sys/Syslog.pm
line 277.

Expected Results:  The program should run without errors, and make the syslog
call correctly.

Additional info:

Looking on the web, someone suggested it was a distribution-related bug, and the
following change would fix it:
 --- /usr/lib/perl5/5.6.0/i386-linux/Sys/Syslog.pm       Wed Feb  6 12:12:29
+++ my_syslog.pm        Wed Feb  6 12:36:39 2002
@@ -274,7 +274,7 @@
         socket(SYSLOG,AF_INET,SOCK_DGRAM,$udp)           || croak "socket: $!";
         connect(SYSLOG,$that)                            || croak "connect:
     } else {
-        my $syslog = &_PATH_LOG                          || croak "_PATH_LOG
not found in syslog.ph";
+        my $syslog = &_PATH_LOG()                          || croak "_PATH_LOG
not found in syslog.ph";
         my $that = sockaddr_un($syslog)                  || croak "Can't locate
         socket(SYSLOG,AF_UNIX,SOCK_STREAM,0)             || croak "socket: $!";
         if (!connect(SYSLOG,$that)) {

Indeed, adding the '()' on line 277 seems to fix the problem. Or at least there
are no more errors, and the syslog call actualy works.

Comment 1 Chip Turner 2002-04-11 00:20:27 UTC
is this now fixed with the perl 5.6.1 errata?

Comment 2 Daniel Hanks 2002-04-11 15:08:20 UTC
Yes, upgrading to the 5.6.1 errata RPMS does seem to fix the problem. The test 
program above runs without errors, and successfully logs. It appears the problem is 
fixed with these RPMS.

Comment 3 David Lawrence 2002-04-11 15:11:54 UTC

Note You need to log in before you can comment on or make changes to this bug.