Front page | perl.perl5.porters |
Postings from April 2001
[ID 20010426.006] Sys::Syslog ignores LOG_AUTH constant
From:
Chris Bongaarts
Date:
April 26, 2001 15:11
Subject:
[ID 20010426.006] Sys::Syslog ignores LOG_AUTH constant
Message ID:
iss.2042.3ae89cd7.6cfba.1@earth.tc.umn.edu
This is a bug report for perl from cab@tc.umn.edu,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
The Sys::Syslog module bundled with perl does not properly handle
the LOG_AUTH constant. constant_LOG_AU() has a comparison that
tests for greater-than-or-equal instead of strictly greater-than,
which results in the routine setting errno and exiting
prematurely; the LOG_AUTH constant code is never reached. Here
is a patch that fixes it:
--- perl-5.6.0/ext/Sys/Syslog/Syslog.xs Thu Feb 22 20:57:54 2001
+++ perl-5.6.0a/ext/Sys/Syslog/Syslog.xs Wed Apr 25 18:39:34 2001
@@ -106,7 +106,7 @@
static double
constant_LOG_AU(char *name, int len)
{
- if (6 + 2 >= len ) {
+ if (6 + 2 > len ) {
errno = EINVAL;
return 0;
}
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=low
---
Site configuration information for perl v5.6.0:
Configured by cab at Thu Aug 24 15:17:34 CDT 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris
uname='sunos earth.tc.umn.edu 5.6 generic_105181-16 sun4u sparc sunw,ultra-2 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-I/usr/local/include -I/opt/local/include -I/opt/gnu/include'
ccflags ='-I/usr/local/include -I/opt/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib -L/opt/SUNWspro/SC4.2/lib '
libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /opt/SUNWspro/SC4.2/lib /lib /usr/lib /usr/ccs/lib
libs=-lsfio -lsocket -lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lsec
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib -L/opt/SUNWspro/SC4.2/lib'
Locally applied patches:
---
@INC for perl v5.6.0:
/opt/perl5.6.0/lib/5.6.0/sun4-solaris
/opt/perl5.6.0/lib/5.6.0
/opt/perl5.6.0/lib/site_perl/5.6.0/sun4-solaris
/opt/perl5.6.0/lib/site_perl/5.6.0
/opt/perl5.6.0/lib/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/cab
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/cab/bin:/usr/local/openwin/bin:/usr/local/sbin:/usr/local/bin:/usr/local/gnu/bin:/usr/openwin/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/sbin:/opt/mailhub/sbin:/opt/mailhub/bin:/opt/gnu/bin:/opt/vcon/sbin:/opt/osdist/sbin:/usr/opt/SUNWmd/sbin:/opt/openssl/bin:/opt/apache/bin:/usr/proc/bin:/home/cab/bin:/usr/local/bin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/usr/ucb:.:/opt/perl/bin:/usr/ucb
PERL_BADLANG (unset)
SHELL=/bin/tcsh