Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ext/Sys/Syslog/t/syslog.t #136 on cygwin #8935

Closed
p5pRT opened this issue Jun 20, 2007 · 10 comments
Closed

Fix ext/Sys/Syslog/t/syslog.t #136 on cygwin #8935

p5pRT opened this issue Jun 20, 2007 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 20, 2007

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

Searchable as RT43268$

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2007

From @rurban

This is a bug report for perl from cygwin@​cygwin.com,
generated with the help of perlbug 1.35 running under perl 5.9.4.


Attached patch fixes
../ext/Sys/Syslog/t/syslog.t 1 256 159 1 136
on cygwin without running syslog-ng
Apply to bleadperl.

Without the syslog-ng daemon /dev/log and /dev/conslog are not writable
in Sys​::Syslog.pm​:161

The patch detects for cygwin an installed syslog-ng binary (service
check within TAINT not possible) and fixes the checks.



Flags​:
  category=library
  severity=medium


Site configuration information for perl 5.9.4​:

Configured by rurban at Wed Jun 20 02​:16​:19 GMT 2007.

Summary of my perl5 (revision 5 version 9 subversion 4) configuration​:
  Platform​:
  osname=cygwin, osvers=1.5.24(0.15642),
archname=cygwin-thread-multi-64int
  uname='cygwin_nt-5.1 reini 1.5.24(0.15642) 2007-01-31 10​:57 i686
cygwin '
  config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads
-Uusemymalloc -Doptimize=-O3 -Dman3ext=3pm -Dusesitecustomize -Dusedevel'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
  use64bitint=define, use64bitall=undef, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing
-pipe -Wdeclaration-after-statement',
  optimize='-O3',
  cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe
-Wdeclaration-after-statement'
  ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using
dmd 0.125)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long long', ivsize=8, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='ld2', ldflags =' -Wl,--enable-auto-import -s -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib /lib
  libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
  perllibs=-ldl -lcrypt -lgdbm_compat
  libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
  cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'

Locally applied patches​:
  hints.cygwin.sh - ldflags -s
  lib-ExtUtils-Embed - insensitive against leading \\s
  lib-Test-Harness-Straps - $ENV{PERL5LIB} = ''
  major.version.cygwin.sh - cygperl-5_8.dll and not cygperl-5_8_x.dll
  Win32CORE - add Win32CORE to core


@​INC for perl 5.9.4​:
  /usr/lib/perl5/5.9/cygwin
  /usr/lib/perl5/5.9
  /usr/lib/perl5/site_perl/5.9/cygwin
  /usr/lib/perl5/site_perl/5.9
  /usr/lib/perl5/site_perl/5.9
  /usr/lib/perl5/vendor_perl/5.9/cygwin
  /usr/lib/perl5/vendor_perl/5.9
  /usr/lib/perl5/vendor_perl/5.9
  .


Environment for perl 5.9.4​:
  CYGWIN=server
  HOME=/home/rurban
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/usr/bin​:/usr/sbin​:/usr/local/sbin​:/usr/bin​:/usr/sbin​:/usr/local/sbin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/X11R6/bin​:/cygdrive/c/WINDOWS/system32​:/cygdrive/c/WINDOWS​:/cygdrive/c/WINDOWS/System32/Wbem​:/bin​:/cygdrive/c/uti​:/bin​:/usr/lib/lapack
  PERL_BADLANG (unset)
  SHELL (unset)
--
Reini Urban
http​://phpwiki.org/ http​://murbreak.at/
http​://helsinki.at/ http​://spacemovie.mur.at/

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2007

From @rurban

pl-cyg-syslog-ng.patch
--- perl-5.9.5/ext/Sys/Syslog/t/syslog.t.orig	2006-09-04 15:50:20.000000000 +0000
+++ perl-5.9.5/ext/Sys/Syslog/t/syslog.t	2007-06-20 20:20:56.765625000 +0000
@@ -181,7 +181,15 @@
 # setlogsock() with "stream" and an undef path
 $r = eval { setlogsock("stream", undef ) } || '';
 is( $@, '', "setlogsock() called, with 'stream' and an undef path" );
-ok( $r, "setlogsock() should return true: '$r'" );
+if ($^O eq 'cygwin') {
+  if (-x '/usr/sbin/syslog-ng'){ #`/usr/bin/ps -W` =~ m{/usr/sbin/syslog-ng} taint problem
+    ok( $r, "setlogsock() on Cygwin with syslog-ng should return true: '$r'. Please do net start syslog-ng" );
+  } else  {
+    nok( $r, "setlogsock() on Cygwin without syslog-ng should return false: '$r'" );
+  }
+} else {
+  ok( $r, "setlogsock() should return true: '$r'" );
+}
 
 # setlogsock() with "stream" and an empty path
 $r = eval { setlogsock("stream", '' ) } || '';

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2007

From @jdhedden

Reini Urban wrote​:

This is a bug report for perl from cygwin@​cygwin.com,
generated with the help of perlbug 1.35 running under perl 5.9.4.

-----------------------------------------------------------------
Attached patch fixes
../ext/Sys/Syslog/t/syslog.t 1 256 159 1 136
on cygwin without running syslog-ng
Apply to bleadperl.

Without the syslog-ng daemon /dev/log and /dev/conslog are not writable
in Sys​::Syslog.pm​:161

The patch detects for cygwin an installed syslog-ng binary (service
check within TAINT not possible) and fixes the checks.

This bug was also reported against Sys​::Syslog​:
  http​://rt.cpan.org/Ticket/Display.html?id=20635

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2007

From @rurban

Note​:
First reported at http​://rt.cpan.org/Ticket/Display.html?id=20635
against Sys​::Syslog.
--
Reini Urban

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2007

From [Unknown Contact. See original ticket]

Note​:
First reported at http​://rt.cpan.org/Ticket/Display.html?id=20635
against Sys​::Syslog.
--
Reini Urban

@p5pRT
Copy link
Author

p5pRT commented Jun 20, 2007

@rurban - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 19, 2007

From @smpeters

On Wed Jun 20 13​:41​:12 2007, jdhedden@​cpan.org wrote​:

Reini Urban wrote​:

This is a bug report for perl from cygwin@​cygwin.com,
generated with the help of perlbug 1.35 running under perl 5.9.4.

-----------------------------------------------------------------
Attached patch fixes
../ext/Sys/Syslog/t/syslog.t 1 256 159 1 136
on cygwin without running syslog-ng
Apply to bleadperl.

Without the syslog-ng daemon /dev/log and /dev/conslog are not writable
in Sys​::Syslog.pm​:161

The patch detects for cygwin an installed syslog-ng binary (service
check within TAINT not possible) and fixes the checks.

This bug was also reported against Sys​::Syslog​:
http​://rt.cpan.org/Ticket/Display.html?id=20635

Per the Sys-Syslog RT, "This issue has been resolved with Sys​::Syslog 0.19".

@p5pRT
Copy link
Author

p5pRT commented Dec 19, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Dec 19, 2007

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

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2008

p5p@spam.wizbit.be - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant