This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 467240 - No error reporting when config is a directory
No error reporting when config is a directory
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl-Config-General (Show other bugs)
5.3
All Linux
medium Severity medium
: rc
: ---
Assigned To: perl-maint-list
BaseOS QE - Apps
: Rebase
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-16 10:35 EDT by Petr Šplíchal
Modified: 2016-05-31 21:37 EDT (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 658945 658946 (view as bug list)
Environment:
Last Closed: 2013-03-06 07:17:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
CPAN 61302 None None None Never

  None (edit)
Description Petr Šplíchal 2008-10-16 10:35:24 EDT
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 08:55:03 EST
This was fixed by upstream in version 2.44.
Comment 2 Petr Pisar 2010-09-13 07:25:03 EDT
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 07:43:31 EDT
Should be available in the RHEL Cluster-Storage (v. 5 server) repo.
Comment 4 Petr Pisar 2010-09-13 10:37:49 EDT
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 11:24:00 EST
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 08:12:04 EDT
    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 11:26:41 EDT
    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 Product and Program Management 2011-09-22 20:18:31 EDT
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 Product and Program Management 2012-06-11 21:08:19 EDT
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 07:17:18 EST
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.