Skip Menu |
 

This queue is for tickets about the Net-Daemon CPAN distribution.

Report information
The Basics
Id: 123213
Status: new
Priority: 0/
Queue: Net-Daemon

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments
0001-Fix-ReadConfigFile-implementation-traversing-INC.patch



Subject: configfile support broken on Perl 5.26

Due to the fact that:

"do q[file]"

Implies @INC traversal, and that @INC no longer contains '.' since Perl 5.26, Net::Daemon is now broken when "configfile" is not a path relative to a path in @INC

The likely solution is to pass File::Spec->rel2abs( ) on the input file, as  "do" with a fully qualifed filename skips @INC traversal, as does "do" with a filename with an explicit "./" prefix.


-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

This incidentally breaks DBI's test suite when installed.

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
Subject: 0001-Fix-ReadConfigFile-implementation-traversing-INC.patch
From 08cfbdfae6e6956e1e2bbc2d0821c64daea9fd55 Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentfredric@gmail.com> Date: Sun, 8 Oct 2017 10:17:23 +1300 Subject: Fix ReadConfigFile implementation traversing @INC Bug: https://rt.cpan.org/Ticket/Display.html?id=123213 Bug: https://bugs.gentoo.org/633722 --- lib/Net/Daemon.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Net/Daemon.pm b/lib/Net/Daemon.pm index fbcc9dd..6aaa151 100644 --- a/lib/Net/Daemon.pm +++ b/lib/Net/Daemon.pm @@ -29,6 +29,7 @@ use IO::Socket (); use Config (); use Net::Daemon::Log (); use POSIX (); +use File::Spec (); package Net::Daemon; @@ -201,7 +202,7 @@ sub ReadConfigFile { if (! -f $file) { $self->Fatal("No such config file: $file"); } - my $copts = do $file; + my $copts = do File::Spec->rel2abs($file); if ($@) { $self->Fatal("Error while processing config file $file: $@"); } -- 2.14.1


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.