Bug 59384

Summary: Problems with Sys::Syslog (syslog.pm)
Product: [Retired] Red Hat Linux Reporter: Daniel Hanks <hanksdc>
Component: perlAssignee: Chip Turner <cturner>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-11 15:08:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
5.6.0-17

How reproducible:
Always

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

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


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:
<diff>
 --- /usr/lib/perl5/5.6.0/i386-linux/Sys/Syslog.pm       Wed Feb  6 12:12:29
2002
+++ 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
$syslog";
         socket(SYSLOG,AF_UNIX,SOCK_STREAM,0)             || croak "socket: $!";
         if (!connect(SYSLOG,$that)) {
</diff>

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
 Closing