Bug 467240 - No error reporting when config is a directory
Summary: No error reporting when config is a directory
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl-Config-General
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: perl-maint-list
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-16 14:35 UTC by Petr Šplíchal
Modified: 2016-06-01 01:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
The Config::General module has been upgraded to upstream version 2.50, which provides a large number of bug fixes and enhancements over the previous version, 2.40. This upgrade incorporates a lot of changes since the 2.40 release of the module, but the API remains compatible.
Clone Of:
: 658945 658946 (view as bug list)
Environment:
Last Closed: 2013-03-06 12:17:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CPAN 61302 0 None None None Never

Description Petr Šplíchal 2008-10-16 14:35:24 UTC
Description of problem:

When Config::General is supplied a directory instead of a config file
it silently accepts it and returns an empty config hash.

Version-Release number of selected component (if applicable):
perl-Config-General-2.40-1.el5.noarch

Steps to Reproduce:
use Data::Dumper;
use Config::General;

my $configurator = new Config::General("/etc/httpd/conf.d/");
%config = $configurator->getall;
print Dumper(\%config);
  
Actual results:
$VAR1 = {};

Expected results:
It should croak something like:
Config::General: Cannot open "/etc/httpd/conf.d/" par parsing, it's a directory.
[and return non-zero exit status]

Additional info:
Croaks well with non-existing files:
Config::General The file "/etc/httpd/conf.dd/" does not exist within ConfigPath: /etc/httpd/conf.dd! at test.pl line 6

Comment 1 Marcela Mašláňová 2010-01-20 13:55:03 UTC
This was fixed by upstream in version 2.44.

Comment 2 Petr Pisar 2010-09-13 11:25:03 UTC
Where did get this package? It's not in part of RHEL-5.5. Which repository do you use?

Comment 3 Petr Šplíchal 2010-09-13 11:43:31 UTC
Should be available in the RHEL Cluster-Storage (v. 5 server) repo.

Comment 4 Petr Pisar 2010-09-13 14:37:49 UTC
Minimal test case:

use Config::General;
Config::General->new(".")->getall;


In contrast to comment #1, I think this bug has not been fixed in upstream 2.44 version and it presents in current upstream 2.49 version. A bug has been reported to upstream.

Comment 6 Petr Pisar 2010-12-01 16:24:00 UTC
Fixed in upstream version 2.50 version. Changelog:

  2.50
        - fixed rt.cpan.org#63487 documentation error.

        - fixed rt.cpan.org#61302, now croak if the config file
          parameter is a directory and directory include is not
          turned on.

        - fixed rt.cpan.org#60429 META.yml typo

        - added new option -AllowSingleQuoteInterpolation, which
          turns on interpolation for variables inside single quotes.

        - added test case for the new option

Test:

$ perl -I /tmp/Config-General-2.50/blib/lib/ -MConfig::General -e 'Config::General->new(".")->getall'
Config::General: config file argument is a directory, expecting a file!
 at -e line 1

Comment 8 Petr Pisar 2011-07-18 12:12:04 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
New version 2.50 accumulates a lot of fixes gathered since version 2.40 (in three years). API remains compatible.

Comment 11 Douglas Silas 2011-07-18 15:26:41 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-New version 2.50 accumulates a lot of fixes gathered since version 2.40 (in three years). API remains compatible.+The Config::General module has been upgraded to upstream version 2.50, which provides a large number of bug fixes and enhancements over the previous version, 2.40. This upgrade incorporates a lot of changes since the 2.40 release of the module, but the API remains compatible.

Comment 13 RHEL Program Management 2011-09-23 00:18:31 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 14 RHEL Program Management 2012-06-12 01:08:19 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 15 Marcela Mašláňová 2013-03-06 12:17:18 UTC
I am sorry, but it is too late in the RHEL-5 release cycle.  At the moment we are addressing only critical and security related issues in RHEL-5.  This one is not reproducible in RHEL-6.  I am closing the bug as NEXTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.