develooper Front page | perl.perl5.porters | Postings from April 2001

[ID 20010426.006] Sys::Syslog ignores LOG_AUTH constant

Chris Bongaarts
April 26, 2001 15:11
[ID 20010426.006] Sys::Syslog ignores LOG_AUTH constant
Message ID:

This is a bug report for perl from,
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]
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:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos 5.6 generic_105181-16 sun4u sparc sunw,ultra-2 '
    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
    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/, 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:

Environment for perl v5.6.0:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About