Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 59384 - Problems with Sys::Syslog (syslog.pm)
Problems with Sys::Syslog (syslog.pm)
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-02-06 14:49 EST by Daniel Hanks
Modified: 2007-04-18 12:39 EDT (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Daniel Hanks 2002-02-06 14:49:48 EST
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-10 20:20:27 EDT
is this now fixed with the perl 5.6.1 errata?
Comment 2 Daniel Hanks 2002-04-11 11:08:20 EDT
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 11:11:54 EDT

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