Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.92k stars 549 forks source link

Sys::Syslog issues. #6174

Closed p5pRT closed 21 years ago

p5pRT commented 21 years ago

Migrated from rt.perl.org#19306 (status was 'resolved')

Searchable as RT19306$

p5pRT commented 21 years ago

From bicknell@ufp.org

Created by bicknell@ufp.org

Issue #1 - Message sent to those in the Sys​::Syslog file bounces.

  It would seem that all four e-mail addresses listed in Sys​::Syslog   no longer works\, in particular tchrist@​convex.com\,   lwall@​jpl-devvax.jpl.nasa.gov\, robinson_s@​sc.maricopa.edu\,   Tim.Bunce@​ig.co.uk. Perhaps they could be updated\, or at least   a note to that effect put into place?

Issue #2 - Defaults in Sys​::Syslog are non-intuitive. Below is a   message I originally attempted to send to the four   addresses above.

  The four of you have your names on Sys​::Syslog\, which is why I'm   contacting you. I recently ran into some confusion\, admittedly of   my own making\, but it seems like the defaults of Sys​::Syslog leave   something to be desired.  
  FreeBSD (my test platform) and many other operating systems today   allow for "secure" syslog\, which really means don't accept inet   domain messages. This is done to prevent syslog from becoming a   remote disk filling service. This has no effect on C programs   because the libc variant of the syslog functions only uses unix   domain sockets for communication. In FreeBSD see   /usr/src/lib/libc/gen/syslog.c\, in particular connectlog().  
  For some reason\, possibly a good one\, Sys​::Syslog defaults to inet\,   rather than unix. The net result on these "secure" syslog setups   is that Sys​::Syslog becomes non-functional out of the box. This   is of course fixable\, as documented in the Sys​::Syslog man page\,   with setlogsock('unix') -- however that is counter-intuitive.   Indeed\, the very top of the man page proclaims​:  
  NAME   Sys​::Syslog\, openlog\, closelog\, setlogmask\, syslog - Perl   interface to the UNIX syslog(3) calls  
  One would expect the interface to syslog(3) to have the same defaults   as syslog(3).  
  Is there a reason that the perl library was defaulted to inet? Is   there any support for changing the default to unix?

Background bug information​:

  Although I'm using perlbug to submit this\, which is including   information from my local machine this problem seems to be in all   versions of perl 5.x.

Perl Info ``` Site configuration information for perl 5.00503: Configured by markm at Sun Mar 5 13:39:27 SAST 2000. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=freebsd, osvers=4.0-current, archname=i386-freebsd uname='FreeBSD freefall.FreeBSD.org 4.0-current FreeBSD 4.0-current #0: $Date$' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='undef', gccversion=2.95.2 19991024 (release) cppflags='' ccflags ='' stdchar='char', d_stdstdio=undef, usevfork=true intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='-Wl,-E -lperl -lm ' libpth=/usr/lib libs=-lm -lc -lcrypt libc=, so=so, useshrplib=true, libperl=libperl.so.3 Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/lib' cccdlflags='-DPIC -fpic', lddlflags='-Wl,-E -shared -lperl -lm ' Locally applied patches: @INC for perl 5.00503: /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . Environment for perl 5.00503: HOME=/home/bicknell LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/bicknell/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/lib:/etc:/usr/X11R6/bin:/usr/games:/inet/majordom/bin:/usr/local/pgsql/bin:. PERL_BADLANG (unset) SHELL=/usr/local/bin/tcsh ```
p5pRT commented 21 years ago

From @eserte

Leo Bicknell (via RT) \perlbug\-followup@​perl\.org writes​:

# New Ticket Created by Leo Bicknell # Please include the string​: [perl #19306] # in the subject line of all future correspondence about this issue. # \<URL​: http​://rt.perl.org/rt2/Ticket/Display.html?id=19306 >

This is a bug report for perl from bicknell@​ufp.org\, generated with the help of perlbug 1.26 running under perl 5.00503.

----------------------------------------------------------------- [Please enter your report here]

Issue #1 - Message sent to those in the Sys​::Syslog file bounces.

It would seem that all four e-mail addresses listed in Sys​::Syslog no longer works\, in particular tchrist@​convex.com\, lwall@​jpl-devvax.jpl.nasa.gov\, robinson_s@​sc.maricopa.edu\, Tim.Bunce@​ig.co.uk. Perhaps they could be updated\, or at least a note to that effect put into place?

Issue #2 - Defaults in Sys​::Syslog are non-intuitive. Below is a message I originally attempted to send to the four addresses above.

The four of you have your names on Sys​::Syslog\, which is why I'm contacting you. I recently ran into some confusion\, admittedly of my own making\, but it seems like the defaults of Sys​::Syslog leave something to be desired.

FreeBSD (my test platform) and many other operating systems today allow for "secure" syslog\, which really means don't accept inet domain messages. This is done to prevent syslog from becoming a remote disk filling service. This has no effect on C programs because the libc variant of the syslog functions only uses unix domain sockets for communication. In FreeBSD see /usr/src/lib/libc/gen/syslog.c\, in particular connectlog().

For some reason\, possibly a good one\, Sys​::Syslog defaults to inet\, rather than unix. The net result on these "secure" syslog setups is that Sys​::Syslog becomes non-functional out of the box. This is of course fixable\, as documented in the Sys​::Syslog man page\, with setlogsock('unix') -- however that is counter-intuitive. Indeed\, the very top of the man page proclaims​:

NAME Sys​::Syslog\, openlog\, closelog\, setlogmask\, syslog - Perl interface to the UNIX syslog(3) calls

One would expect the interface to syslog(3) to have the same defaults as syslog(3).

Is there a reason that the perl library was defaulted to inet? Is there any support for changing the default to unix?

Background bug information​:

Although I'm using perlbug to submit this\, which is including information from my local machine this problem seems to be in all versions of perl 5.x.

This does not seem to be a problem in 5.8.0's Sys​::Syslog. According to the documentation\, by default the types tcp\, udp\, unix\, stream\, console are tried in order. It also seems to work on my FreeBSD 4.7 system (syslogd is started with -s flag) without specifying setlogsock().

Regards\,   Slaven

-- Slaven Rezic - slaven.rezic@​berlin.de

  tkruler - Perl/Tk program for measuring screen distances   http​://ptktools.sourceforge.net/#tkruler

p5pRT commented 21 years ago

From bicknell@ufp.org

This does not seem to be a problem in 5.8.0's Sys​::Syslog. According to the documentation\, by default the types tcp\, udp\, unix\, stream\, console are tried in order. It also seems to work on my FreeBSD 4.7 system (syslogd is started with -s flag) without specifying setlogsock().

Agreed. 5.8 seems to have fixed the problem. Good enough for me.

--   Leo Bicknell - bicknell@​ufp.org - CCIE 3440   PGP keys at http​://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@​tmbg.org\, www.tmbg.org

p5pRT commented 21 years ago

@rspier - Status changed from 'new' to 'resolved'

p5pRT commented 21 years ago

From @ysth

On 20 Dec 2002 15​:22​:59 -0000\, Leo Bicknell wrote​:

Issue #1 - Message sent to those in the Sys​::Syslog file bounces.

It would seem that all four e-mail addresses listed in Sys​::Syslog no longer works\, in particular tchrist@​convex.com\, lwall@​jpl-devvax.jpl.nasa.gov\, robinson_s@​sc.maricopa.edu\, Tim.Bunce@​ig.co.uk. Perhaps they could be updated\, or at least a note to that effect put into place?

Patch at end removes a comment block\, which is repeated later in the POD with newer email addresses for Larry and Tom. Sean Robinson doesn't seem to have been in touch for several years. Tim Bunce seems to be using Tim.Bunce@​pobox.com or timbo@​valueclick.com. Tim\, do you want your address updated in the AUTHORS file and elsewhere​:

AUTHORS​:Tim Bunce \Tim\.Bunce@&#8203;ig\.co\.uk ext/DynaLoader/DynaLoader_pm.PL​:# Tim.Bunce@​ig.co.uk\, August 1994 ext/DynaLoader/XSLoader_pm.PL​:# Tim.Bunce@​ig.co.uk\, August 1994 ext/Opcode/Safe.pm​:E\lt>F\<Tim\.Bunce@&#8203;ig\.co\.ukE\. ext/Sys/Syslog/Syslog.pm​:E\lt>F\<Tim\.Bunce@&#8203;ig\.co\.ukE\ and the perl5-porters mailing list. hints/os390.sh​:# Tim Bunce \Tim\.Bunce@&#8203;ig\.co\.uk lib/Benchmark.pm​:Jarkko Hietaniemi \F\<jhi@&#8203;iki\.fi>\, Tim Bunce \F\<Tim\.Bunce@&#8203;ig\.co\.uk> lib/CGI.pm​:=item Tim Bunce (Tim.Bunce@​ig.co.uk) lib/ExtUtils/Embed.pm​:Based on ideas from Tim Bunce E\lt>F\<Tim\.Bunce@&#8203;ig\.co\.ukE\ and lib/File/Path.pm​:Tim Bunce \F\<Tim\.Bunce@&#8203;ig\.co\.uk> and lib/File/Spec.pm​:\A\.Koenig@&#8203;franz\.ww\.TU\-Berlin\.DE\, Tim Bunce \<Tim.Bunce@​ig.co.uk. makeaperl.SH​:Tim Bunce \Tim\.Bunce@&#8203;ig\.co\.uk\, Andreas Koenig minimod.pl​:# \Tim\.Bunce@&#8203;ig\.co\.uk pod/perltoc.pod​:(tc@​vcpc.univie.ac.at)\, Tim Bunce (Tim.Bunce@​ig.co.uk)\, Tom Christiansen Porting/patching.pod​:Adapted from a posting to perl5-porters by Tim Bunce (Tim.Bunce@​ig.co.uk). Porting/pumpkin.pod​:Tim Bunce Tim.Bunce@​ig.co.uk .

Inline Patch ```diff --- perl/ext/Sys/Syslog/Syslog.pm.orig Thu Aug 22 15:59:56 2002 +++ perl/ext/Sys/Syslog/Syslog.pm Mon Dec 23 15:23:38 2002 @@ -26,15 +26,6 @@ use Socket; use Sys::Hostname; -# adapted from syslog.pl -# -# Tom Christiansen -# modified to use sockets by Larry Wall -# NOTE: openlog now takes three arguments, just like openlog(3) -# Modified to add UNIX domain sockets by Sean Robinson -# with support from Tim Bunce and the perl5-porters mailing list -# Modified to use an XS backend instead of syslog.ph by Tom Hughes - =head1 NAME Sys::Syslog, openlog, closelog, setlogmask, syslog - Perl interface to the UNIX syslog(3) calls End of Patch. ```
p5pRT commented 21 years ago

From @tux

On Tue 24 Dec 2002 00​:25\, sthoenna@​efn.org (Yitzchak Scott-Thoennes) wrote​:

On 20 Dec 2002 15​:22​:59 -0000\, Leo Bicknell wrote​:

Issue #1 - Message sent to those in the Sys​::Syslog file bounces.

It would seem that all four e-mail addresses listed in Sys​::Syslog no longer works\, in particular tchrist@​convex.com\, lwall@​jpl-devvax.jpl.nasa.gov\, robinson_s@​sc.maricopa.edu\, Tim.Bunce@​ig.co.uk. Perhaps they could be updated\, or at least a note to that effect put into place?

Patch at end removes a comment block\, which is repeated later in the

Thanks\, patch at end applied as change #18350

POD with newer email addresses for Larry and Tom. Sean Robinson doesn't seem to have been in touch for several years. Tim Bunce seems to be using Tim.Bunce@​pobox.com or timbo@​valueclick.com. Tim\, do you want your address updated in the AUTHORS file and elsewhere​:

-- H.Merijn Brand Amsterdam Perl Mongers (http​://amsterdam.pm.org/) using perl-5.6.1\, 5.8.0 & 633 on HP-UX 10.20 & 11.00\, AIX 4.2\, AIX 4.3\,   WinNT 4\, Win2K pro & WinCE 2.11. Smoking perl CORE​: smokers@​perl.org http​://archives.develooper.com/daily-build@​perl.org/ perl-qa@​perl.org send smoke reports to​: smokers-reports@​perl.org\, QA​: http​://qa.perl.org

p5pRT commented 21 years ago

@cwest - Status changed from 'open' to 'resolved'